<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE Trustworthy #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE NoImplicitPrelude #-}</span><span>
</span><span id="line-3"></span><span>
</span><span id="line-4"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-5"></span><span class="hs-comment">-- |</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- Module      :  Text.Read.Lex</span><span>
</span><span id="line-7"></span><span class="hs-comment">-- Copyright   :  (c) The University of Glasgow 2002</span><span>
</span><span id="line-8"></span><span class="hs-comment">-- License     :  BSD-style (see the file libraries/base/LICENSE)</span><span>
</span><span id="line-9"></span><span class="hs-comment">--</span><span>
</span><span id="line-10"></span><span class="hs-comment">-- Maintainer  :  libraries@haskell.org</span><span>
</span><span id="line-11"></span><span class="hs-comment">-- Stability   :  provisional</span><span>
</span><span id="line-12"></span><span class="hs-comment">-- Portability :  non-portable (uses Text.ParserCombinators.ReadP)</span><span>
</span><span id="line-13"></span><span class="hs-comment">--</span><span>
</span><span id="line-14"></span><span class="hs-comment">-- The cut-down Haskell lexer, used by Text.Read</span><span>
</span><span id="line-15"></span><span class="hs-comment">--</span><span>
</span><span id="line-16"></span><span class="hs-comment">-----------------------------------------------------------------------------</span><span>
</span><span id="line-17"></span><span>
</span><span id="line-18"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Text.Read.Lex</span><span>
</span><span id="line-19"></span><span>  </span><span class="hs-comment">-- lexing types</span><span>
</span><span id="line-20"></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier">Lexeme</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Number"><span class="hs-identifier">Number</span></a></span><span>
</span><span id="line-21"></span><span>
</span><span id="line-22"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#numberToInteger"><span class="hs-identifier">numberToInteger</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#numberToFixed"><span class="hs-identifier">numberToFixed</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#numberToRational"><span class="hs-identifier">numberToRational</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#numberToRangedRational"><span class="hs-identifier">numberToRangedRational</span></a></span><span>
</span><span id="line-23"></span><span>
</span><span id="line-24"></span><span>  </span><span class="hs-comment">-- lexer</span><span>
</span><span id="line-25"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#lex"><span class="hs-identifier">lex</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#expect"><span class="hs-identifier">expect</span></a></span><span>
</span><span id="line-26"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#hsLex"><span class="hs-identifier">hsLex</span></a></span><span>
</span><span id="line-27"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#lexChar"><span class="hs-identifier">lexChar</span></a></span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readIntP"><span class="hs-identifier">readIntP</span></a></span><span>
</span><span id="line-30"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readOctP"><span class="hs-identifier">readOctP</span></a></span><span>
</span><span id="line-31"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readDecP"><span class="hs-identifier">readDecP</span></a></span><span>
</span><span id="line-32"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readHexP"><span class="hs-identifier">readHexP</span></a></span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span>  </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#isSymbolChar"><span class="hs-identifier">isSymbolChar</span></a></span><span>
</span><span id="line-35"></span><span>  </span><span class="hs-special">)</span><span>
</span><span id="line-36"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-37"></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html"><span class="hs-identifier">Text.ParserCombinators.ReadP</span></a></span><span>
</span><span id="line-39"></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Base.html"><span class="hs-identifier">GHC.Base</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Char.html"><span class="hs-identifier">GHC.Char</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Num.html"><span class="hs-identifier">GHC.Num</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier">Num</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier">Integer</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Show.html"><span class="hs-identifier">GHC.Show</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Show.html#Show"><span class="hs-identifier">Show</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-44"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Unicode.html"><span class="hs-identifier">GHC.Unicode</span></a></span><span>
</span><span id="line-45"></span><span>  </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Unicode.html#GeneralCategory"><span class="hs-identifier">GeneralCategory</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#generalCategory"><span class="hs-identifier">generalCategory</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isSpace"><span class="hs-identifier">isSpace</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isAlpha"><span class="hs-identifier">isAlpha</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Unicode.html#isAlphaNum"><span class="hs-identifier">isAlphaNum</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Real.html"><span class="hs-identifier">GHC.Real</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Real.html#Rational"><span class="hs-identifier">Rational</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Real.html#%25"><span class="hs-operator">(%)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier">fromIntegral</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier">Integral</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-47"></span><span>                 </span><span class="annot"><a href="GHC.Real.html#toInteger"><span class="hs-identifier">toInteger</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Real.html#%5E"><span class="hs-operator">(^)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Real.html#quot"><span class="hs-identifier">quot</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Real.html#even"><span class="hs-identifier">even</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.List.html"><span class="hs-identifier">GHC.List</span></a></span><span>
</span><span id="line-49"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="GHC.Enum.html"><span class="hs-identifier">GHC.Enum</span></a></span><span class="hs-special">(</span><span> </span><span class="annot"><a href="GHC.Enum.html#minBound"><span class="hs-identifier">minBound</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Enum.html#maxBound"><span class="hs-identifier">maxBound</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-50"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Data.Maybe.html"><span class="hs-identifier">Data.Maybe</span></a></span><span>
</span><span id="line-51"></span><span>
</span><span id="line-52"></span><span class="hs-comment">-- local copy to break import-cycle</span><span>
</span><span id="line-53"></span><span class="hs-comment">-- | @'guard' b@ is @'return' ()@ if @b@ is 'True',</span><span>
</span><span id="line-54"></span><span class="hs-comment">-- and 'mzero' if @b@ is 'False'.</span><span>
</span><span id="line-55"></span><span id="local-6989586621679488404"><span class="annot"><a href="Text.Read.Lex.html#guard"><span class="hs-identifier hs-type">guard</span></a></span><span>           </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Base.html#MonadPlus"><span class="hs-identifier hs-type">MonadPlus</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488404"><span class="hs-identifier hs-type">m</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679488404"><span class="hs-identifier hs-type">m</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span><span>
</span><span id="line-56"></span><span id="guard"><span class="annot"><span class="annottext">guard :: forall (m :: * -&gt; *). MonadPlus m =&gt; Bool -&gt; m ()
</span><a href="Text.Read.Lex.html#guard"><span class="hs-identifier hs-var hs-var">guard</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>      </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">() -&gt; m ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-57"></span><span class="annot"><a href="Text.Read.Lex.html#guard"><span class="hs-identifier hs-var">guard</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>     </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">m ()
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a
</span><a href="GHC.Base.html#mzero"><span class="hs-identifier hs-var">mzero</span></a></span><span>
</span><span id="line-58"></span><span>
</span><span id="line-59"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-60"></span><span class="hs-comment">-- Lexing types</span><span>
</span><span id="line-61"></span><span>
</span><span id="line-62"></span><span class="hs-comment">-- ^ Haskell lexemes.</span><span>
</span><span id="line-63"></span><span class="hs-keyword">data</span><span> </span><span id="Lexeme"><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-var">Lexeme</span></a></span></span><span>
</span><span id="line-64"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span id="Char"><span class="annot"><a href="Text.Read.Lex.html#Char"><span class="hs-identifier hs-var">Char</span></a></span></span><span>   </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>         </span><span class="hs-comment">-- ^ Character literal</span><span>
</span><span id="line-65"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="String"><span class="annot"><a href="Text.Read.Lex.html#String"><span class="hs-identifier hs-var">String</span></a></span></span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>       </span><span class="hs-comment">-- ^ String literal, with escapes interpreted</span><span>
</span><span id="line-66"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Punc"><span class="annot"><a href="Text.Read.Lex.html#Punc"><span class="hs-identifier hs-var">Punc</span></a></span></span><span>   </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>       </span><span class="hs-comment">-- ^ Punctuation or reserved symbol, e.g. @(@, @::@</span><span>
</span><span id="line-67"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Ident"><span class="annot"><a href="Text.Read.Lex.html#Ident"><span class="hs-identifier hs-var">Ident</span></a></span></span><span>  </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>       </span><span class="hs-comment">-- ^ Haskell identifier, e.g. @foo@, @Baz@</span><span>
</span><span id="line-68"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Symbol"><span class="annot"><a href="Text.Read.Lex.html#Symbol"><span class="hs-identifier hs-var">Symbol</span></a></span></span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>       </span><span class="hs-comment">-- ^ Haskell symbol, e.g. @&gt;&gt;@, @:%@</span><span>
</span><span id="line-69"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="Number"><span class="annot"><a href="Text.Read.Lex.html#Number"><span class="hs-identifier hs-var">Number</span></a></span></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Number"><span class="hs-identifier hs-type">Number</span></a></span><span>       </span><span class="hs-comment">-- ^ @since 4.6.0.0</span><span>
</span><span id="line-70"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span id="EOF"><span class="annot"><a href="Text.Read.Lex.html#EOF"><span class="hs-identifier hs-var">EOF</span></a></span></span><span>
</span><span id="line-71"></span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679488102"><span id="local-6989586621679488110"><span class="annot"><span class="annottext">Lexeme -&gt; Lexeme -&gt; Bool
(Lexeme -&gt; Lexeme -&gt; Bool)
-&gt; (Lexeme -&gt; Lexeme -&gt; Bool) -&gt; Eq Lexeme
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Lexeme -&gt; Lexeme -&gt; Bool
$c/= :: Lexeme -&gt; Lexeme -&gt; Bool
== :: Lexeme -&gt; Lexeme -&gt; Bool
$c== :: Lexeme -&gt; Lexeme -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>   </span><span class="hs-comment">-- ^ @since 2.01</span><span>
</span><span id="line-72"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679488081"><span id="local-6989586621679488083"><span id="local-6989586621679488099"><span class="annot"><span class="annottext">Int -&gt; Lexeme -&gt; ShowS
[Lexeme] -&gt; ShowS
Lexeme -&gt; String
(Int -&gt; Lexeme -&gt; ShowS)
-&gt; (Lexeme -&gt; String) -&gt; ([Lexeme] -&gt; ShowS) -&gt; Show Lexeme
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Lexeme] -&gt; ShowS
$cshowList :: [Lexeme] -&gt; ShowS
show :: Lexeme -&gt; String
$cshow :: Lexeme -&gt; String
showsPrec :: Int -&gt; Lexeme -&gt; ShowS
$cshowsPrec :: Int -&gt; Lexeme -&gt; ShowS
</span><a href="GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 2.01</span><span>
</span><span id="line-73"></span><span>          </span><span class="hs-special">)</span><span>
</span><span id="line-74"></span><span>
</span><span id="line-75"></span><span class="hs-comment">-- | @since 4.6.0.0</span><span>
</span><span id="line-76"></span><span class="hs-keyword">data</span><span> </span><span id="Number"><span class="annot"><a href="Text.Read.Lex.html#Number"><span class="hs-identifier hs-var">Number</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="MkNumber"><span class="annot"><a href="Text.Read.Lex.html#MkNumber"><span class="hs-identifier hs-var">MkNumber</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>              </span><span class="hs-comment">-- Base</span><span>
</span><span id="line-77"></span><span>                       </span><span class="annot"><a href="Text.Read.Lex.html#Digits"><span class="hs-identifier hs-type">Digits</span></a></span><span>           </span><span class="hs-comment">-- Integral part</span><span>
</span><span id="line-78"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span id="MkDecimal"><span class="annot"><a href="Text.Read.Lex.html#MkDecimal"><span class="hs-identifier hs-var">MkDecimal</span></a></span></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Digits"><span class="hs-identifier hs-type">Digits</span></a></span><span>          </span><span class="hs-comment">-- Integral part</span><span>
</span><span id="line-79"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Digits"><span class="hs-identifier hs-type">Digits</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- Fractional part</span><span>
</span><span id="line-80"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- Exponent</span><span>
</span><span id="line-81"></span><span> </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span> </span><span id="local-6989586621679488067"><span id="local-6989586621679488076"><span class="annot"><span class="annottext">Number -&gt; Number -&gt; Bool
(Number -&gt; Number -&gt; Bool)
-&gt; (Number -&gt; Number -&gt; Bool) -&gt; Eq Number
forall a. (a -&gt; a -&gt; Bool) -&gt; (a -&gt; a -&gt; Bool) -&gt; Eq a
/= :: Number -&gt; Number -&gt; Bool
$c/= :: Number -&gt; Number -&gt; Bool
== :: Number -&gt; Number -&gt; Bool
$c== :: Number -&gt; Number -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Eq</span></a></span></span></span><span>   </span><span class="hs-comment">-- ^ @since 4.6.0.0</span><span>
</span><span id="line-82"></span><span>          </span><span class="hs-special">,</span><span> </span><span id="local-6989586621679488051"><span id="local-6989586621679488053"><span id="local-6989586621679488065"><span class="annot"><span class="annottext">Int -&gt; Number -&gt; ShowS
[Number] -&gt; ShowS
Number -&gt; String
(Int -&gt; Number -&gt; ShowS)
-&gt; (Number -&gt; String) -&gt; ([Number] -&gt; ShowS) -&gt; Show Number
forall a.
(Int -&gt; a -&gt; ShowS) -&gt; (a -&gt; String) -&gt; ([a] -&gt; ShowS) -&gt; Show a
showList :: [Number] -&gt; ShowS
$cshowList :: [Number] -&gt; ShowS
show :: Number -&gt; String
$cshow :: Number -&gt; String
showsPrec :: Int -&gt; Number -&gt; ShowS
$cshowsPrec :: Int -&gt; Number -&gt; ShowS
</span><a href="GHC.Show.html#Show"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var hs-var hs-var">Show</span></a></span></span></span></span><span> </span><span class="hs-comment">-- ^ @since 4.6.0.0</span><span>
</span><span id="line-83"></span><span>          </span><span class="hs-special">)</span><span>
</span><span id="line-84"></span><span>
</span><span id="line-85"></span><span class="hs-comment">-- | @since 4.5.1.0</span><span>
</span><span id="line-86"></span><span class="annot"><a href="Text.Read.Lex.html#numberToInteger"><span class="hs-identifier hs-type">numberToInteger</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Number"><span class="hs-identifier hs-type">Number</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-87"></span><span id="numberToInteger"><span class="annot"><span class="annottext">numberToInteger :: Number -&gt; Maybe Integer
</span><a href="Text.Read.Lex.html#numberToInteger"><span class="hs-identifier hs-var hs-var">numberToInteger</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Read.Lex.html#MkNumber"><span class="hs-identifier hs-type">MkNumber</span></a></span><span> </span><span id="local-6989586621679488049"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679488049"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679488048"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488048"><span class="hs-identifier hs-var">iPart</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Digits -&gt; Integer
forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679488049"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488048"><span class="hs-identifier hs-var">iPart</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-88"></span><span class="annot"><a href="Text.Read.Lex.html#numberToInteger"><span class="hs-identifier hs-var">numberToInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Read.Lex.html#MkDecimal"><span class="hs-identifier hs-type">MkDecimal</span></a></span><span> </span><span id="local-6989586621679488046"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488046"><span class="hs-identifier hs-var">iPart</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Digits
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Digits -&gt; Integer
forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488046"><span class="hs-identifier hs-var">iPart</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-89"></span><span class="annot"><a href="Text.Read.Lex.html#numberToInteger"><span class="hs-identifier hs-var">numberToInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Number
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Integer
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-90"></span><span>
</span><span id="line-91"></span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-92"></span><span class="annot"><a href="Text.Read.Lex.html#numberToFixed"><span class="hs-identifier hs-type">numberToFixed</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Number"><span class="hs-identifier hs-type">Number</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-93"></span><span id="numberToFixed"><span class="annot"><span class="annottext">numberToFixed :: Integer -&gt; Number -&gt; Maybe (Integer, Integer)
</span><a href="Text.Read.Lex.html#numberToFixed"><span class="hs-identifier hs-var hs-var">numberToFixed</span></a></span></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Read.Lex.html#MkNumber"><span class="hs-identifier hs-type">MkNumber</span></a></span><span> </span><span id="local-6989586621679488045"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679488045"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679488044"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488044"><span class="hs-identifier hs-var">iPart</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Integer, Integer) -&gt; Maybe (Integer, Integer)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Digits -&gt; Integer
forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679488045"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488044"><span class="hs-identifier hs-var">iPart</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-94"></span><span class="annot"><a href="Text.Read.Lex.html#numberToFixed"><span class="hs-identifier hs-var">numberToFixed</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Read.Lex.html#MkDecimal"><span class="hs-identifier hs-type">MkDecimal</span></a></span><span> </span><span id="local-6989586621679488043"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488043"><span class="hs-identifier hs-var">iPart</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe Digits
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(Integer, Integer) -&gt; Maybe (Integer, Integer)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Digits -&gt; Integer
forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488043"><span class="hs-identifier hs-var">iPart</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span>
</span><span id="line-95"></span><span class="annot"><a href="Text.Read.Lex.html#numberToFixed"><span class="hs-identifier hs-var">numberToFixed</span></a></span><span> </span><span id="local-6989586621679488042"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488042"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Read.Lex.html#MkDecimal"><span class="hs-identifier hs-type">MkDecimal</span></a></span><span> </span><span id="local-6989586621679488041"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488041"><span class="hs-identifier hs-var">iPart</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679488040"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488040"><span class="hs-identifier hs-var">fPart</span></a></span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-96"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679488037"><span class="annot"><span class="annottext">i :: Integer
</span><a href="#local-6989586621679488037"><span class="hs-identifier hs-var hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Digits -&gt; Integer
forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488041"><span class="hs-identifier hs-var">iPart</span></a></span><span>
</span><span id="line-97"></span><span>          </span><span id="local-6989586621679488033"><span class="annot"><span class="annottext">f :: Integer
</span><a href="#local-6989586621679488033"><span class="hs-identifier hs-var hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Digits -&gt; Integer
forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Digits -&gt; Digits
forall a. Integer -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679488032"><span class="hs-identifier hs-var">integerTake</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488042"><span class="hs-identifier hs-var">p</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488040"><span class="hs-identifier hs-var">fPart</span></a></span><span> </span><span class="annot"><span class="annottext">Digits -&gt; Digits -&gt; Digits
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Digits
forall a. a -&gt; [a]
</span><a href="GHC.List.html#repeat"><span class="hs-identifier hs-var">repeat</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-98"></span><span>          </span><span class="hs-comment">-- Sigh, we really want genericTake, but that's above us in</span><span>
</span><span id="line-99"></span><span>          </span><span class="hs-comment">-- the hierarchy, so we define our own version here (actually</span><span>
</span><span id="line-100"></span><span>          </span><span class="hs-comment">-- specialised to Integer)</span><span>
</span><span id="line-101"></span><span>          </span><span id="local-6989586621679488388"><span class="annot"><a href="#local-6989586621679488032"><span class="hs-identifier hs-type">integerTake</span></a></span><span>             </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679488388"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679488388"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-102"></span><span>          </span><span id="local-6989586621679488032"><span class="annot"><span class="annottext">integerTake :: forall a. Integer -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679488032"><span class="hs-identifier hs-var hs-var">integerTake</span></a></span></span><span> </span><span id="local-6989586621679488026"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488026"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488026"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-103"></span><span>          </span><span class="annot"><a href="#local-6989586621679488032"><span class="hs-identifier hs-var">integerTake</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>        </span><span class="hs-glyph">=</span><span>  </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-104"></span><span>          </span><span class="annot"><a href="#local-6989586621679488032"><span class="hs-identifier hs-var">integerTake</span></a></span><span> </span><span id="local-6989586621679488024"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488024"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679488023"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679488023"><span class="hs-identifier hs-var">x</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679488022"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679488022"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span>    </span><span class="hs-glyph">=</span><span>  </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679488023"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; [a] -&gt; [a]
forall a. Integer -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679488032"><span class="hs-identifier hs-var">integerTake</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488024"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679488022"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-105"></span><span>      </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">(Integer, Integer) -&gt; Maybe (Integer, Integer)
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488037"><span class="hs-identifier hs-var">i</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488033"><span class="hs-identifier hs-var">f</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span class="annot"><a href="Text.Read.Lex.html#numberToFixed"><span class="hs-identifier hs-var">numberToFixed</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Number
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe (Integer, Integer)
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-107"></span><span>
</span><span id="line-108"></span><span class="hs-comment">-- This takes a floatRange, and if the Rational would be outside of</span><span>
</span><span id="line-109"></span><span class="hs-comment">-- the floatRange then it may return Nothing. Not that it will not</span><span>
</span><span id="line-110"></span><span class="hs-comment">-- /necessarily/ return Nothing, but it is good enough to fix the</span><span>
</span><span id="line-111"></span><span class="hs-comment">-- space problems in #5688</span><span>
</span><span id="line-112"></span><span class="hs-comment">-- Ways this is conservative:</span><span>
</span><span id="line-113"></span><span class="hs-comment">-- * the floatRange is in base 2, but we pretend it is in base 10</span><span>
</span><span id="line-114"></span><span class="hs-comment">-- * we pad the floateRange a bit, just in case it is very small</span><span>
</span><span id="line-115"></span><span class="hs-comment">--   and we would otherwise hit an edge case</span><span>
</span><span id="line-116"></span><span class="hs-comment">-- * We only worry about numbers that have an exponent. If they don't</span><span>
</span><span id="line-117"></span><span class="hs-comment">--   have an exponent then the Rational won't be much larger than the</span><span>
</span><span id="line-118"></span><span class="hs-comment">--   Number, so there is no problem</span><span>
</span><span id="line-119"></span><span class="hs-comment">-- | @since 4.5.1.0</span><span>
</span><span id="line-120"></span><span class="annot"><a href="Text.Read.Lex.html#numberToRangedRational"><span class="hs-identifier hs-type">numberToRangedRational</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Number"><span class="hs-identifier hs-type">Number</span></a></span><span>
</span><span id="line-121"></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="GHC.Real.html#Rational"><span class="hs-identifier hs-type">Rational</span></a></span><span> </span><span class="hs-comment">-- Nothing = Inf</span><span>
</span><span id="line-122"></span><span id="numberToRangedRational"><span class="annot"><span class="annottext">numberToRangedRational :: (Int, Int) -&gt; Number -&gt; Maybe Rational
</span><a href="Text.Read.Lex.html#numberToRangedRational"><span class="hs-identifier hs-var hs-var">numberToRangedRational</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679488021"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679488021"><span class="hs-identifier hs-var">neg</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679488020"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679488020"><span class="hs-identifier hs-var">pos</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679488019"><span class="annot"><span class="annottext">n :: Number
</span><a href="#local-6989586621679488019"><span class="hs-identifier hs-var">n</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Text.Read.Lex.html#MkDecimal"><span class="hs-identifier hs-type">MkDecimal</span></a></span><span> </span><span id="local-6989586621679488018"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488018"><span class="hs-identifier hs-var">iPart</span></a></span></span><span> </span><span id="local-6989586621679488017"><span class="annot"><span class="annottext">Maybe Digits
</span><a href="#local-6989586621679488017"><span class="hs-identifier hs-var">mFPart</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679488016"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488016"><span class="hs-identifier hs-var">exp</span></a></span></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-123"></span><span>    </span><span class="hs-comment">-- if exp is out of integer bounds,</span><span>
</span><span id="line-124"></span><span>    </span><span class="hs-comment">-- then the number is definitely out of range</span><span>
</span><span id="line-125"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488016"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#maxBound"><span class="hs-identifier hs-var">maxBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span>
</span><span id="line-126"></span><span>      </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488016"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#minBound"><span class="hs-identifier hs-var">minBound</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-127"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Rational
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-128"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>
</span><span id="line-129"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679488007"><span class="annot"><span class="annottext">mFirstDigit :: Maybe Int
</span><a href="#local-6989586621679488007"><span class="hs-identifier hs-var hs-var">mFirstDigit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Bool) -&gt; Digits -&gt; Digits
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="GHC.List.html#dropWhile"><span class="hs-identifier hs-var">dropWhile</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488018"><span class="hs-identifier hs-var">iPart</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-130"></span><span>                        </span><span id="local-6989586621679488005"><span class="annot"><span class="annottext">iPart' :: Digits
</span><a href="#local-6989586621679488005"><span class="hs-identifier hs-var">iPart'</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits -&gt; Int
forall a. [a] -&gt; Int
</span><a href="GHC.List.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488005"><span class="hs-identifier hs-var">iPart'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-131"></span><span>                        </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Digits
</span><a href="#local-6989586621679488017"><span class="hs-identifier hs-var">mFPart</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-132"></span><span>                              </span><span class="annot"><span class="annottext">Maybe Digits
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-133"></span><span>                              </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679488003"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488003"><span class="hs-identifier hs-var">fPart</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-134"></span><span>                                  </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Bool) -&gt; Digits -&gt; (Digits, Digits)
forall a. (a -&gt; Bool) -&gt; [a] -&gt; ([a], [a])
</span><a href="GHC.List.html#span"><span class="hs-identifier hs-var">span</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488003"><span class="hs-identifier hs-var">fPart</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-135"></span><span>                                  </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-136"></span><span>                                  </span><span class="hs-special">(</span><span id="local-6989586621679488001"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488001"><span class="hs-identifier hs-var">zeroes</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Digits
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-137"></span><span>                                      </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. Num a =&gt; a -&gt; a
</span><a href="GHC.Num.html#negate"><span class="hs-identifier hs-var">negate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits -&gt; Int
forall a. [a] -&gt; Int
</span><a href="GHC.List.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679488001"><span class="hs-identifier hs-var">zeroes</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-138"></span><span>      </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="#local-6989586621679488007"><span class="hs-identifier hs-var">mFirstDigit</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-139"></span><span>         </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Maybe Rational
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">0</span></span><span>
</span><span id="line-140"></span><span>         </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679488000"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679488000"><span class="hs-identifier hs-var">firstDigit</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-141"></span><span>             </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679487997"><span class="annot"><span class="annottext">firstDigit' :: Int
</span><a href="#local-6989586621679487997"><span class="hs-identifier hs-var hs-var">firstDigit'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679488000"><span class="hs-identifier hs-var">firstDigit</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679488016"><span class="hs-identifier hs-var">exp</span></a></span><span>
</span><span id="line-142"></span><span>             </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487997"><span class="hs-identifier hs-var">firstDigit'</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679488020"><span class="hs-identifier hs-var">pos</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span>
</span><span id="line-143"></span><span>                </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Maybe Rational
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-144"></span><span>                </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487997"><span class="hs-identifier hs-var">firstDigit'</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679488021"><span class="hs-identifier hs-var">neg</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">3</span></span><span class="hs-special">)</span><span>
</span><span id="line-145"></span><span>                </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Maybe Rational
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Rational
</span><span class="hs-number">0</span></span><span>
</span><span id="line-146"></span><span>                </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Maybe Rational
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Number -&gt; Rational
</span><a href="Text.Read.Lex.html#numberToRational"><span class="hs-identifier hs-var">numberToRational</span></a></span><span> </span><span class="annot"><span class="annottext">Number
</span><a href="#local-6989586621679488019"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-147"></span><span class="annot"><a href="Text.Read.Lex.html#numberToRangedRational"><span class="hs-identifier hs-var">numberToRangedRational</span></a></span><span> </span><span class="annot"><span class="annottext">(Int, Int)
</span><span class="hs-identifier">_</span></span><span> </span><span id="local-6989586621679487995"><span class="annot"><span class="annottext">Number
</span><a href="#local-6989586621679487995"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Rational -&gt; Maybe Rational
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Number -&gt; Rational
</span><a href="Text.Read.Lex.html#numberToRational"><span class="hs-identifier hs-var">numberToRational</span></a></span><span> </span><span class="annot"><span class="annottext">Number
</span><a href="#local-6989586621679487995"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-148"></span><span>
</span><span id="line-149"></span><span class="hs-comment">-- | @since 4.6.0.0</span><span>
</span><span id="line-150"></span><span class="annot"><a href="Text.Read.Lex.html#numberToRational"><span class="hs-identifier hs-type">numberToRational</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Number"><span class="hs-identifier hs-type">Number</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Real.html#Rational"><span class="hs-identifier hs-type">Rational</span></a></span><span>
</span><span id="line-151"></span><span id="numberToRational"><span class="annot"><span class="annottext">numberToRational :: Number -&gt; Rational
</span><a href="Text.Read.Lex.html#numberToRational"><span class="hs-identifier hs-var hs-var">numberToRational</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Read.Lex.html#MkNumber"><span class="hs-identifier hs-type">MkNumber</span></a></span><span> </span><span id="local-6989586621679487994"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487994"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679487993"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487993"><span class="hs-identifier hs-var">iPart</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Digits -&gt; Integer
forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487994"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487993"><span class="hs-identifier hs-var">iPart</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. Integral a =&gt; a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%25"><span class="hs-operator hs-var">%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-152"></span><span class="annot"><a href="Text.Read.Lex.html#numberToRational"><span class="hs-identifier hs-var">numberToRational</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Text.Read.Lex.html#MkDecimal"><span class="hs-identifier hs-type">MkDecimal</span></a></span><span> </span><span id="local-6989586621679487992"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487992"><span class="hs-identifier hs-var">iPart</span></a></span></span><span> </span><span id="local-6989586621679487991"><span class="annot"><span class="annottext">Maybe Digits
</span><a href="#local-6989586621679487991"><span class="hs-identifier hs-var">mFPart</span></a></span></span><span> </span><span id="local-6989586621679487990"><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679487990"><span class="hs-identifier hs-var">mExp</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679487987"><span class="annot"><span class="annottext">i :: Integer
</span><a href="#local-6989586621679487987"><span class="hs-identifier hs-var hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Digits -&gt; Integer
forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487992"><span class="hs-identifier hs-var">iPart</span></a></span><span>
</span><span id="line-154"></span><span>   </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Digits
</span><a href="#local-6989586621679487991"><span class="hs-identifier hs-var">mFPart</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679487990"><span class="hs-identifier hs-var">mExp</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-155"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Digits
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487987"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. Integral a =&gt; a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%25"><span class="hs-operator hs-var">%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-156"></span><span>      </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe Digits
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679487986"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487986"><span class="hs-identifier hs-var">exp</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-157"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487986"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E%3D"><span class="hs-operator hs-var">&gt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>            </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487987"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487986"><span class="hs-identifier hs-var">exp</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. Integral a =&gt; a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%25"><span class="hs-operator hs-var">%</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-158"></span><span>       </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487987"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. Integral a =&gt; a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%25"><span class="hs-operator hs-var">%</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487986"><span class="hs-identifier hs-var">exp</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>      </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679487984"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487984"><span class="hs-identifier hs-var">fPart</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Digits -&gt; Rational
</span><a href="Text.Read.Lex.html#fracExp"><span class="hs-identifier hs-var">fracExp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>   </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487987"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487984"><span class="hs-identifier hs-var">fPart</span></a></span><span>
</span><span id="line-160"></span><span>      </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679487982"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487982"><span class="hs-identifier hs-var">fPart</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679487981"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487981"><span class="hs-identifier hs-var">exp</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Digits -&gt; Rational
</span><a href="Text.Read.Lex.html#fracExp"><span class="hs-identifier hs-var">fracExp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487981"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487987"><span class="hs-identifier hs-var">i</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487982"><span class="hs-identifier hs-var">fPart</span></a></span><span>
</span><span id="line-161"></span><span>      </span><span class="hs-comment">-- fracExp is a bit more efficient in calculating the Rational.</span><span>
</span><span id="line-162"></span><span>      </span><span class="hs-comment">-- Instead of calculating the fractional part alone, then</span><span>
</span><span id="line-163"></span><span>      </span><span class="hs-comment">-- adding the integral part and finally multiplying with</span><span>
</span><span id="line-164"></span><span>      </span><span class="hs-comment">-- 10 ^ exp if an exponent was given, do it all at once.</span><span>
</span><span id="line-165"></span><span>
</span><span id="line-166"></span><span class="hs-comment">-- -----------------------------------------------------------------------------</span><span>
</span><span id="line-167"></span><span class="hs-comment">-- Lexing</span><span>
</span><span id="line-168"></span><span>
</span><span id="line-169"></span><span class="annot"><a href="Text.Read.Lex.html#lex"><span class="hs-identifier hs-type">lex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-170"></span><span id="lex"><span class="annot"><span class="annottext">lex :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lex"><span class="hs-identifier hs-var hs-var">lex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="Text.ParserCombinators.ReadP.html#skipSpaces"><span class="hs-identifier hs-var">skipSpaces</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP () -&gt; ReadP Lexeme -&gt; ReadP Lexeme
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexToken"><span class="hs-identifier hs-var">lexToken</span></a></span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span class="hs-comment">-- | @since 4.7.0.0</span><span>
</span><span id="line-173"></span><span class="annot"><a href="Text.Read.Lex.html#expect"><span class="hs-identifier hs-type">expect</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-174"></span><span id="expect"><span class="annot"><span class="annottext">expect :: Lexeme -&gt; ReadP ()
</span><a href="Text.Read.Lex.html#expect"><span class="hs-identifier hs-var hs-var">expect</span></a></span></span><span> </span><span id="local-6989586621679487978"><span class="annot"><span class="annottext">Lexeme
</span><a href="#local-6989586621679487978"><span class="hs-identifier hs-var">lexeme</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="Text.ParserCombinators.ReadP.html#skipSpaces"><span class="hs-identifier hs-var">skipSpaces</span></a></span><span>
</span><span id="line-175"></span><span>                   </span><span class="hs-special">;</span><span> </span><span id="local-6989586621679487977"><span class="annot"><span class="annottext">Lexeme
</span><a href="#local-6989586621679487977"><span class="hs-identifier hs-var">thing</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexToken"><span class="hs-identifier hs-var">lexToken</span></a></span><span>
</span><span id="line-176"></span><span>                   </span><span class="hs-special">;</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Lexeme
</span><a href="#local-6989586621679487977"><span class="hs-identifier hs-var">thing</span></a></span><span> </span><span class="annot"><span class="annottext">Lexeme -&gt; Lexeme -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Lexeme
</span><a href="#local-6989586621679487978"><span class="hs-identifier hs-var">lexeme</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">() -&gt; ReadP ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">ReadP ()
forall a. ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#pfail"><span class="hs-identifier hs-var">pfail</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-177"></span><span>
</span><span id="line-178"></span><span class="annot"><a href="Text.Read.Lex.html#hsLex"><span class="hs-identifier hs-type">hsLex</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-179"></span><span class="hs-comment">-- ^ Haskell lexer: returns the lexed string, rather than the lexeme</span><span>
</span><span id="line-180"></span><span id="hsLex"><span class="annot"><span class="annottext">hsLex :: ReadP String
</span><a href="Text.Read.Lex.html#hsLex"><span class="hs-identifier hs-var hs-var">hsLex</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="Text.ParserCombinators.ReadP.html#skipSpaces"><span class="hs-identifier hs-var">skipSpaces</span></a></span><span>
</span><span id="line-181"></span><span>           </span><span class="hs-special">(</span><span id="local-6989586621679487975"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487975"><span class="hs-identifier hs-var">s</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Lexeme
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Lexeme -&gt; ReadP (String, Lexeme)
forall a. ReadP a -&gt; ReadP (String, a)
</span><a href="Text.ParserCombinators.ReadP.html#gather"><span class="hs-identifier hs-var">gather</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexToken"><span class="hs-identifier hs-var">lexToken</span></a></span><span>
</span><span id="line-182"></span><span>           </span><span class="annot"><span class="annottext">String -&gt; ReadP String
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487975"><span class="hs-identifier hs-var">s</span></a></span><span>
</span><span id="line-183"></span><span>
</span><span id="line-184"></span><span class="annot"><a href="Text.Read.Lex.html#lexToken"><span class="hs-identifier hs-type">lexToken</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-185"></span><span id="lexToken"><span class="annot"><span class="annottext">lexToken :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexToken"><span class="hs-identifier hs-var hs-var">lexToken</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexEOF"><span class="hs-identifier hs-var">lexEOF</span></a></span><span>     </span><span class="annot"><span class="annottext">ReadP Lexeme -&gt; ReadP Lexeme -&gt; ReadP Lexeme
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span>
</span><span id="line-186"></span><span>           </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexLitChar"><span class="hs-identifier hs-var">lexLitChar</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Lexeme -&gt; ReadP Lexeme -&gt; ReadP Lexeme
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span>
</span><span id="line-187"></span><span>           </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexString"><span class="hs-identifier hs-var">lexString</span></a></span><span>  </span><span class="annot"><span class="annottext">ReadP Lexeme -&gt; ReadP Lexeme -&gt; ReadP Lexeme
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span>
</span><span id="line-188"></span><span>           </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexPunc"><span class="hs-identifier hs-var">lexPunc</span></a></span><span>    </span><span class="annot"><span class="annottext">ReadP Lexeme -&gt; ReadP Lexeme -&gt; ReadP Lexeme
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span>
</span><span id="line-189"></span><span>           </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexSymbol"><span class="hs-identifier hs-var">lexSymbol</span></a></span><span>  </span><span class="annot"><span class="annottext">ReadP Lexeme -&gt; ReadP Lexeme -&gt; ReadP Lexeme
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span>
</span><span id="line-190"></span><span>           </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexId"><span class="hs-identifier hs-var">lexId</span></a></span><span>      </span><span class="annot"><span class="annottext">ReadP Lexeme -&gt; ReadP Lexeme -&gt; ReadP Lexeme
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span>
</span><span id="line-191"></span><span>           </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexNumber"><span class="hs-identifier hs-var">lexNumber</span></a></span><span>
</span><span id="line-192"></span><span>
</span><span id="line-193"></span><span>
</span><span id="line-194"></span><span class="hs-comment">-- ----------------------------------------------------------------------</span><span>
</span><span id="line-195"></span><span class="hs-comment">-- End of file</span><span>
</span><span id="line-196"></span><span class="annot"><a href="Text.Read.Lex.html#lexEOF"><span class="hs-identifier hs-type">lexEOF</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-197"></span><span id="lexEOF"><span class="annot"><span class="annottext">lexEOF :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexEOF"><span class="hs-identifier hs-var hs-var">lexEOF</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487965"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487965"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#look"><span class="hs-identifier hs-var">look</span></a></span><span>
</span><span id="line-198"></span><span>            </span><span class="annot"><span class="annottext">Bool -&gt; ReadP ()
forall (m :: * -&gt; *). MonadPlus m =&gt; Bool -&gt; m ()
</span><a href="Text.Read.Lex.html#guard"><span class="hs-identifier hs-var">guard</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.List.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487965"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-199"></span><span>            </span><span class="annot"><span class="annottext">Lexeme -&gt; ReadP Lexeme
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Lexeme
</span><a href="Text.Read.Lex.html#EOF"><span class="hs-identifier hs-var">EOF</span></a></span><span>
</span><span id="line-200"></span><span>
</span><span id="line-201"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-202"></span><span class="hs-comment">-- Single character lexemes</span><span>
</span><span id="line-203"></span><span>
</span><span id="line-204"></span><span class="annot"><a href="Text.Read.Lex.html#lexPunc"><span class="hs-identifier hs-type">lexPunc</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-205"></span><span id="lexPunc"><span class="annot"><span class="annottext">lexPunc :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexPunc"><span class="hs-identifier hs-var hs-var">lexPunc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-206"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487962"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487962"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#satisfy"><span class="hs-identifier hs-var">satisfy</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="Text.Read.Lex.html#isPuncChar"><span class="hs-identifier hs-var">isPuncChar</span></a></span><span>
</span><span id="line-207"></span><span>     </span><span class="annot"><span class="annottext">Lexeme -&gt; ReadP Lexeme
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Lexeme
</span><a href="Text.Read.Lex.html#Punc"><span class="hs-identifier hs-var">Punc</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487962"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span class="hs-comment">-- | The @special@ character class as defined in the Haskell Report.</span><span>
</span><span id="line-210"></span><span class="annot"><a href="Text.Read.Lex.html#isPuncChar"><span class="hs-identifier hs-type">isPuncChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-211"></span><span id="isPuncChar"><span class="annot"><span class="annottext">isPuncChar :: Char -&gt; Bool
</span><a href="Text.Read.Lex.html#isPuncChar"><span class="hs-identifier hs-var hs-var">isPuncChar</span></a></span></span><span> </span><span id="local-6989586621679487959"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487959"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487959"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; [a] -&gt; Bool
</span><a href="GHC.List.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;,;()[]{}`&quot;</span></span><span>
</span><span id="line-212"></span><span>
</span><span id="line-213"></span><span class="hs-comment">-- ----------------------------------------------------------------------</span><span>
</span><span id="line-214"></span><span class="hs-comment">-- Symbols</span><span>
</span><span id="line-215"></span><span>
</span><span id="line-216"></span><span class="annot"><a href="Text.Read.Lex.html#lexSymbol"><span class="hs-identifier hs-type">lexSymbol</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-217"></span><span id="lexSymbol"><span class="annot"><span class="annottext">lexSymbol :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexSymbol"><span class="hs-identifier hs-var hs-var">lexSymbol</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-218"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487957"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487957"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#munch1"><span class="hs-identifier hs-var">munch1</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="Text.Read.Lex.html#isSymbolChar"><span class="hs-identifier hs-var">isSymbolChar</span></a></span><span>
</span><span id="line-219"></span><span>     </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487957"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; [String] -&gt; Bool
forall a. Eq a =&gt; a -&gt; [a] -&gt; Bool
</span><a href="GHC.List.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">[String]
</span><a href="#local-6989586621679487955"><span class="hs-identifier hs-var">reserved_ops</span></a></span><span> </span><span class="hs-keyword">then</span><span>
</span><span id="line-220"></span><span>        </span><span class="annot"><span class="annottext">Lexeme -&gt; ReadP Lexeme
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Lexeme
</span><a href="Text.Read.Lex.html#Punc"><span class="hs-identifier hs-var">Punc</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487957"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>         </span><span class="hs-comment">-- Reserved-ops count as punctuation</span><span>
</span><span id="line-221"></span><span>      </span><span class="hs-keyword">else</span><span>
</span><span id="line-222"></span><span>        </span><span class="annot"><span class="annottext">Lexeme -&gt; ReadP Lexeme
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Lexeme
</span><a href="Text.Read.Lex.html#Symbol"><span class="hs-identifier hs-var">Symbol</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487957"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-223"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-224"></span><span>    </span><span id="local-6989586621679487955"><span class="annot"><span class="annottext">reserved_ops :: [String]
</span><a href="#local-6989586621679487955"><span class="hs-identifier hs-var hs-var">reserved_ops</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;..&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;::&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;=&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\\&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;|&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&lt;-&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&gt;&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;@&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;~&quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;=&gt;&quot;</span></span><span class="hs-special">]</span><span>
</span><span id="line-225"></span><span>
</span><span id="line-226"></span><span class="annot"><a href="Text.Read.Lex.html#isSymbolChar"><span class="hs-identifier hs-type">isSymbolChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span>
</span><span id="line-227"></span><span id="isSymbolChar"><span class="annot"><span class="annottext">isSymbolChar :: Char -&gt; Bool
</span><a href="Text.Read.Lex.html#isSymbolChar"><span class="hs-identifier hs-var hs-var">isSymbolChar</span></a></span></span><span> </span><span id="local-6989586621679487954"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487954"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="Text.Read.Lex.html#isPuncChar"><span class="hs-identifier hs-var">isPuncChar</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487954"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char -&gt; GeneralCategory
</span><a href="GHC.Unicode.html#generalCategory"><span class="hs-identifier hs-var">generalCategory</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487954"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-228"></span><span>    </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#MathSymbol"><span class="hs-identifier hs-var">MathSymbol</span></a></span><span>              </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-229"></span><span>    </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#CurrencySymbol"><span class="hs-identifier hs-var">CurrencySymbol</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-230"></span><span>    </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#ModifierSymbol"><span class="hs-identifier hs-var">ModifierSymbol</span></a></span><span>          </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-231"></span><span>    </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#OtherSymbol"><span class="hs-identifier hs-var">OtherSymbol</span></a></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-232"></span><span>    </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#DashPunctuation"><span class="hs-identifier hs-var">DashPunctuation</span></a></span><span>         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span>
</span><span id="line-233"></span><span>    </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#OtherPunctuation"><span class="hs-identifier hs-var">OtherPunctuation</span></a></span><span>        </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487954"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; [a] -&gt; Bool
</span><a href="GHC.List.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;'\&quot;&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-234"></span><span>    </span><span class="annot"><span class="annottext">GeneralCategory
</span><a href="GHC.Unicode.html#ConnectorPunctuation"><span class="hs-identifier hs-var">ConnectorPunctuation</span></a></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487954"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'_'</span></span><span>
</span><span id="line-235"></span><span>    </span><span class="annot"><span class="annottext">GeneralCategory
</span><span class="hs-identifier">_</span></span><span>                       </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span>
</span><span id="line-236"></span><span class="hs-comment">-- ----------------------------------------------------------------------</span><span>
</span><span id="line-237"></span><span class="hs-comment">-- identifiers</span><span>
</span><span id="line-238"></span><span>
</span><span id="line-239"></span><span class="annot"><a href="Text.Read.Lex.html#lexId"><span class="hs-identifier hs-type">lexId</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-240"></span><span id="lexId"><span class="annot"><span class="annottext">lexId :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexId"><span class="hs-identifier hs-var hs-var">lexId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487943"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487943"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#satisfy"><span class="hs-identifier hs-var">satisfy</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679487942"><span class="hs-identifier hs-var">isIdsChar</span></a></span><span>
</span><span id="line-241"></span><span>           </span><span id="local-6989586621679487941"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487941"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#munch"><span class="hs-identifier hs-var">munch</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679487939"><span class="hs-identifier hs-var">isIdfChar</span></a></span><span>
</span><span id="line-242"></span><span>           </span><span class="annot"><span class="annottext">Lexeme -&gt; ReadP Lexeme
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Lexeme
</span><a href="Text.Read.Lex.html#Ident"><span class="hs-identifier hs-var">Ident</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487943"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487941"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-243"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-244"></span><span>          </span><span class="hs-comment">-- Identifiers can start with a '_'</span><span>
</span><span id="line-245"></span><span>    </span><span id="local-6989586621679487942"><span class="annot"><span class="annottext">isIdsChar :: Char -&gt; Bool
</span><a href="#local-6989586621679487942"><span class="hs-identifier hs-var hs-var">isIdsChar</span></a></span></span><span> </span><span id="local-6989586621679487937"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487937"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Unicode.html#isAlpha"><span class="hs-identifier hs-var">isAlpha</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487937"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487937"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'_'</span></span><span>
</span><span id="line-246"></span><span>    </span><span id="local-6989586621679487939"><span class="annot"><span class="annottext">isIdfChar :: Char -&gt; Bool
</span><a href="#local-6989586621679487939"><span class="hs-identifier hs-var hs-var">isIdfChar</span></a></span></span><span> </span><span id="local-6989586621679487935"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487935"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Unicode.html#isAlphaNum"><span class="hs-identifier hs-var">isAlphaNum</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487935"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487935"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; [a] -&gt; Bool
</span><a href="GHC.List.html#elem"><span class="hs-operator hs-var">`elem`</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;_'&quot;</span></span><span>
</span><span id="line-247"></span><span>
</span><span id="line-248"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-249"></span><span class="hs-comment">-- Lexing character literals</span><span>
</span><span id="line-250"></span><span>
</span><span id="line-251"></span><span class="annot"><a href="Text.Read.Lex.html#lexLitChar"><span class="hs-identifier hs-type">lexLitChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-252"></span><span id="lexLitChar"><span class="annot"><span class="annottext">lexLitChar :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexLitChar"><span class="hs-identifier hs-var hs-var">lexLitChar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-253"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span>
</span><span id="line-254"></span><span>     </span><span class="hs-special">(</span><span id="local-6989586621679487933"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487933"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679487932"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679487932"><span class="hs-identifier hs-var">esc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP (Char, Bool)
</span><a href="Text.Read.Lex.html#lexCharE"><span class="hs-identifier hs-var">lexCharE</span></a></span><span>
</span><span id="line-255"></span><span>     </span><span class="annot"><span class="annottext">Bool -&gt; ReadP ()
forall (m :: * -&gt; *). MonadPlus m =&gt; Bool -&gt; m ()
</span><a href="Text.Read.Lex.html#guard"><span class="hs-identifier hs-var">guard</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679487932"><span class="hs-identifier hs-var">esc</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487933"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span class="hs-special">)</span><span>   </span><span class="hs-comment">-- Eliminate '' possibility</span><span>
</span><span id="line-256"></span><span>     </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span>
</span><span id="line-257"></span><span>     </span><span class="annot"><span class="annottext">Lexeme -&gt; ReadP Lexeme
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Lexeme
</span><a href="Text.Read.Lex.html#Char"><span class="hs-identifier hs-var">Char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487933"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-258"></span><span>
</span><span id="line-259"></span><span class="annot"><a href="Text.Read.Lex.html#lexChar"><span class="hs-identifier hs-type">lexChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span>
</span><span id="line-260"></span><span id="lexChar"><span class="annot"><span class="annottext">lexChar :: ReadP Char
</span><a href="Text.Read.Lex.html#lexChar"><span class="hs-identifier hs-var hs-var">lexChar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679487930"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487930"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP (Char, Bool)
</span><a href="Text.Read.Lex.html#lexCharE"><span class="hs-identifier hs-var">lexCharE</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="#local-6989586621679487929"><span class="hs-identifier hs-var">consumeEmpties</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487930"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-261"></span><span>    </span><span class="hs-keyword">where</span><span>
</span><span id="line-262"></span><span>    </span><span class="hs-comment">-- Consumes the string &quot;\&amp;&quot; repeatedly and greedily (will only produce one match)</span><span>
</span><span id="line-263"></span><span>    </span><span class="annot"><a href="#local-6989586621679487929"><span class="hs-identifier hs-type">consumeEmpties</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-264"></span><span>    </span><span id="local-6989586621679487929"><span class="annot"><span class="annottext">consumeEmpties :: ReadP ()
</span><a href="#local-6989586621679487929"><span class="hs-identifier hs-var hs-var">consumeEmpties</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-265"></span><span>        </span><span id="local-6989586621679487928"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487928"><span class="hs-identifier hs-var">rest</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#look"><span class="hs-identifier hs-var">look</span></a></span><span>
</span><span id="line-266"></span><span>        </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487928"><span class="hs-identifier hs-var">rest</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-267"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\\'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'&amp;'</span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;\\&amp;&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP () -&gt; ReadP ()
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="#local-6989586621679487929"><span class="hs-identifier hs-var">consumeEmpties</span></a></span><span>
</span><span id="line-268"></span><span>            </span><span class="annot"><span class="annottext">String
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; ReadP ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-269"></span><span>
</span><span id="line-270"></span><span>
</span><span id="line-271"></span><span class="annot"><a href="Text.Read.Lex.html#lexCharE"><span class="hs-identifier hs-type">lexCharE</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span>  </span><span class="hs-comment">-- &quot;escaped or not&quot;?</span><span>
</span><span id="line-272"></span><span id="lexCharE"><span class="annot"><span class="annottext">lexCharE :: ReadP (Char, Bool)
</span><a href="Text.Read.Lex.html#lexCharE"><span class="hs-identifier hs-var hs-var">lexCharE</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-273"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487926"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487926"><span class="hs-identifier hs-var">c1</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-274"></span><span>     </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487926"><span class="hs-identifier hs-var">c1</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\\'</span></span><span>
</span><span id="line-275"></span><span>       </span><span class="hs-keyword">then</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487924"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487924"><span class="hs-identifier hs-var">c2</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="#local-6989586621679487923"><span class="hs-identifier hs-var">lexEsc</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">(Char, Bool) -&gt; ReadP (Char, Bool)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487924"><span class="hs-identifier hs-var">c2</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span>       </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">(Char, Bool) -&gt; ReadP (Char, Bool)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487926"><span class="hs-identifier hs-var">c1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-277"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-278"></span><span>  </span><span id="local-6989586621679487923"><span class="annot"><span class="annottext">lexEsc :: ReadP Char
</span><a href="#local-6989586621679487923"><span class="hs-identifier hs-var hs-var">lexEsc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-279"></span><span>    </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="#local-6989586621679487922"><span class="hs-identifier hs-var">lexEscChar</span></a></span><span>
</span><span id="line-280"></span><span>      </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP Char -&gt; ReadP Char
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="#local-6989586621679487921"><span class="hs-identifier hs-var">lexNumeric</span></a></span><span>
</span><span id="line-281"></span><span>        </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP Char -&gt; ReadP Char
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="#local-6989586621679487920"><span class="hs-identifier hs-var">lexCntrlChar</span></a></span><span>
</span><span id="line-282"></span><span>          </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP Char -&gt; ReadP Char
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="#local-6989586621679487919"><span class="hs-identifier hs-var">lexAscii</span></a></span><span>
</span><span id="line-283"></span><span>
</span><span id="line-284"></span><span>  </span><span id="local-6989586621679487922"><span class="annot"><span class="annottext">lexEscChar :: ReadP Char
</span><a href="#local-6989586621679487922"><span class="hs-identifier hs-var hs-var">lexEscChar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-285"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487907"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487907"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-286"></span><span>       </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487907"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-287"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'a'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\a'</span></span><span>
</span><span id="line-288"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'b'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\b'</span></span><span>
</span><span id="line-289"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'f'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\f'</span></span><span>
</span><span id="line-290"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'n'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\n'</span></span><span>
</span><span id="line-291"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'r'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\r'</span></span><span>
</span><span id="line-292"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'t'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\t'</span></span><span>
</span><span id="line-293"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'v'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\v'</span></span><span>
</span><span id="line-294"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\\'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\\'</span></span><span>
</span><span id="line-295"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\&quot;'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\&quot;'</span></span><span>
</span><span id="line-296"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\''</span></span><span>
</span><span id="line-297"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ReadP Char
forall a. ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#pfail"><span class="hs-identifier hs-var">pfail</span></a></span><span>
</span><span id="line-298"></span><span>
</span><span id="line-299"></span><span>  </span><span id="local-6989586621679487921"><span class="annot"><span class="annottext">lexNumeric :: ReadP Char
</span><a href="#local-6989586621679487921"><span class="hs-identifier hs-var hs-var">lexNumeric</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-300"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487894"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487894"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Int
</span><a href="Text.Read.Lex.html#lexBaseChar"><span class="hs-identifier hs-var">lexBaseChar</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Int -&gt; ReadP Int -&gt; ReadP Int
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%3C%2B%2B"><span class="hs-operator hs-var">&lt;++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Int
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-301"></span><span>       </span><span id="local-6989586621679487891"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487891"><span class="hs-identifier hs-var">n</span></a></span></span><span>    </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Integer
</span><a href="Text.Read.Lex.html#lexInteger"><span class="hs-identifier hs-var">lexInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487894"><span class="hs-identifier hs-var">base</span></a></span><span>
</span><span id="line-302"></span><span>       </span><span class="annot"><span class="annottext">Bool -&gt; ReadP ()
forall (m :: * -&gt; *). MonadPlus m =&gt; Bool -&gt; m ()
</span><a href="Text.Read.Lex.html#guard"><span class="hs-identifier hs-var">guard</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487891"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a. Integral a =&gt; a -&gt; Integer
</span><a href="GHC.Real.html#toInteger"><span class="hs-identifier hs-var">toInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
forall a. Bounded a =&gt; a
</span><a href="GHC.Enum.html#maxBound"><span class="hs-identifier hs-var">maxBound</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-303"></span><span>       </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Char
</span><a href="GHC.Char.html#chr"><span class="hs-identifier hs-var">chr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Int
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487891"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-304"></span><span>
</span><span id="line-305"></span><span>  </span><span id="local-6989586621679487920"><span class="annot"><span class="annottext">lexCntrlChar :: ReadP Char
</span><a href="#local-6989586621679487920"><span class="hs-identifier hs-var hs-var">lexCntrlChar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-306"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'^'</span></span><span>
</span><span id="line-307"></span><span>       </span><span id="local-6989586621679487853"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487853"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-308"></span><span>       </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487853"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-309"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'@'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^@'</span></span><span>
</span><span id="line-310"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'A'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^A'</span></span><span>
</span><span id="line-311"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'B'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^B'</span></span><span>
</span><span id="line-312"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'C'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^C'</span></span><span>
</span><span id="line-313"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'D'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^D'</span></span><span>
</span><span id="line-314"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'E'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^E'</span></span><span>
</span><span id="line-315"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'F'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^F'</span></span><span>
</span><span id="line-316"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'G'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^G'</span></span><span>
</span><span id="line-317"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'H'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^H'</span></span><span>
</span><span id="line-318"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'I'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^I'</span></span><span>
</span><span id="line-319"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'J'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^J'</span></span><span>
</span><span id="line-320"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'K'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^K'</span></span><span>
</span><span id="line-321"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'L'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^L'</span></span><span>
</span><span id="line-322"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'M'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^M'</span></span><span>
</span><span id="line-323"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'N'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^N'</span></span><span>
</span><span id="line-324"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'O'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^O'</span></span><span>
</span><span id="line-325"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'P'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^P'</span></span><span>
</span><span id="line-326"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'Q'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^Q'</span></span><span>
</span><span id="line-327"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'R'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^R'</span></span><span>
</span><span id="line-328"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'S'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^S'</span></span><span>
</span><span id="line-329"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'T'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^T'</span></span><span>
</span><span id="line-330"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'U'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^U'</span></span><span>
</span><span id="line-331"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'V'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^V'</span></span><span>
</span><span id="line-332"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'W'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^W'</span></span><span>
</span><span id="line-333"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'X'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^X'</span></span><span>
</span><span id="line-334"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'Y'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^Y'</span></span><span>
</span><span id="line-335"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'Z'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^Z'</span></span><span>
</span><span id="line-336"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'['</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^['</span></span><span>
</span><span id="line-337"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\\'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^\'</span></span><span>
</span><span id="line-338"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">']'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^]'</span></span><span>
</span><span id="line-339"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'^'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^^'</span></span><span>
</span><span id="line-340"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'_'</span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\^_'</span></span><span>
</span><span id="line-341"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ReadP Char
forall a. ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#pfail"><span class="hs-identifier hs-var">pfail</span></a></span><span>
</span><span id="line-342"></span><span>
</span><span id="line-343"></span><span>  </span><span id="local-6989586621679487919"><span class="annot"><span class="annottext">lexAscii :: ReadP Char
</span><a href="#local-6989586621679487919"><span class="hs-identifier hs-var hs-var">lexAscii</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-344"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">[ReadP Char] -&gt; ReadP Char
forall a. [ReadP a] -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#choice"><span class="hs-identifier hs-var">choice</span></a></span><span>
</span><span id="line-345"></span><span>         </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SOH&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\SOH'</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP Char -&gt; ReadP Char
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%3C%2B%2B"><span class="hs-operator hs-var">&lt;++</span></a></span><span>
</span><span id="line-346"></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SO&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\SO'</span></span><span class="hs-special">)</span><span>
</span><span id="line-347"></span><span>                </span><span class="hs-comment">-- \SO and \SOH need maximal-munch treatment</span><span>
</span><span id="line-348"></span><span>                </span><span class="hs-comment">-- See the Haskell report Sect 2.6</span><span>
</span><span id="line-349"></span><span>
</span><span id="line-350"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NUL&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\NUL'</span></span><span>
</span><span id="line-351"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;STX&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\STX'</span></span><span>
</span><span id="line-352"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ETX&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\ETX'</span></span><span>
</span><span id="line-353"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;EOT&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\EOT'</span></span><span>
</span><span id="line-354"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ENQ&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\ENQ'</span></span><span>
</span><span id="line-355"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ACK&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\ACK'</span></span><span>
</span><span id="line-356"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;BEL&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\BEL'</span></span><span>
</span><span id="line-357"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;BS&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\BS'</span></span><span>
</span><span id="line-358"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;HT&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\HT'</span></span><span>
</span><span id="line-359"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;LF&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\LF'</span></span><span>
</span><span id="line-360"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;VT&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\VT'</span></span><span>
</span><span id="line-361"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;FF&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\FF'</span></span><span>
</span><span id="line-362"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CR&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\CR'</span></span><span>
</span><span id="line-363"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SI&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\SI'</span></span><span>
</span><span id="line-364"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DLE&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\DLE'</span></span><span>
</span><span id="line-365"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DC1&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\DC1'</span></span><span>
</span><span id="line-366"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DC2&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\DC2'</span></span><span>
</span><span id="line-367"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DC3&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\DC3'</span></span><span>
</span><span id="line-368"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DC4&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\DC4'</span></span><span>
</span><span id="line-369"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;NAK&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\NAK'</span></span><span>
</span><span id="line-370"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SYN&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\SYN'</span></span><span>
</span><span id="line-371"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ETB&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\ETB'</span></span><span>
</span><span id="line-372"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;CAN&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\CAN'</span></span><span>
</span><span id="line-373"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;EM&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\EM'</span></span><span>
</span><span id="line-374"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SUB&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\SUB'</span></span><span>
</span><span id="line-375"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;ESC&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\ESC'</span></span><span>
</span><span id="line-376"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;FS&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\FS'</span></span><span>
</span><span id="line-377"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;GS&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\GS'</span></span><span>
</span><span id="line-378"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;RS&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\RS'</span></span><span>
</span><span id="line-379"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;US&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\US'</span></span><span>
</span><span id="line-380"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;SP&quot;</span></span><span>  </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\SP'</span></span><span>
</span><span id="line-381"></span><span>         </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#string"><span class="hs-identifier hs-var">string</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;DEL&quot;</span></span><span> </span><span class="annot"><span class="annottext">ReadP String -&gt; ReadP Char -&gt; ReadP Char
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\DEL'</span></span><span>
</span><span id="line-382"></span><span>         </span><span class="hs-special">]</span><span>
</span><span id="line-383"></span><span>
</span><span id="line-384"></span><span>
</span><span id="line-385"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-386"></span><span class="hs-comment">-- string literal</span><span>
</span><span id="line-387"></span><span>
</span><span id="line-388"></span><span class="annot"><a href="Text.Read.Lex.html#lexString"><span class="hs-identifier hs-type">lexString</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-389"></span><span id="lexString"><span class="annot"><span class="annottext">lexString :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexString"><span class="hs-identifier hs-var hs-var">lexString</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-390"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'&quot;'</span></span><span>
</span><span id="line-391"></span><span>     </span><span class="annot"><span class="annottext">ShowS -&gt; ReadP Lexeme
</span><a href="#local-6989586621679487783"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="annot"><span class="annottext">ShowS
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-392"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-393"></span><span>  </span><span id="local-6989586621679487783"><span class="annot"><span class="annottext">body :: ShowS -&gt; ReadP Lexeme
</span><a href="#local-6989586621679487783"><span class="hs-identifier hs-var hs-var">body</span></a></span></span><span> </span><span id="local-6989586621679487778"><span class="annot"><span class="annottext">ShowS
</span><a href="#local-6989586621679487778"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-394"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679487777"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487777"><span class="hs-identifier hs-var">c</span></a></span></span><span class="hs-special">,</span><span id="local-6989586621679487776"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679487776"><span class="hs-identifier hs-var">esc</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP (Char, Bool)
</span><a href="#local-6989586621679487775"><span class="hs-identifier hs-var">lexStrItem</span></a></span><span>
</span><span id="line-395"></span><span>       </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487777"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%2F%3D"><span class="hs-operator hs-var">/=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'&quot;'</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%7C%7C"><span class="hs-operator hs-var">||</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679487776"><span class="hs-identifier hs-var">esc</span></a></span><span>
</span><span id="line-396"></span><span>         </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">ShowS -&gt; ReadP Lexeme
</span><a href="#local-6989586621679487783"><span class="hs-identifier hs-var">body</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ShowS
</span><a href="#local-6989586621679487778"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">ShowS -&gt; ShowS -&gt; ShowS
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487777"><span class="hs-identifier hs-var">c</span></a></span><span class="annot"><span class="annottext">Char -&gt; ShowS
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-397"></span><span>         </span><span class="hs-keyword">else</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679487773"><span class="annot"><span class="annottext">s :: String
</span><a href="#local-6989586621679487773"><span class="hs-identifier hs-var hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ShowS
</span><a href="#local-6989586621679487778"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span> </span><span class="hs-keyword">in</span><span>
</span><span id="line-398"></span><span>              </span><span class="annot"><span class="annottext">Lexeme -&gt; ReadP Lexeme
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Lexeme
</span><a href="Text.Read.Lex.html#String"><span class="hs-identifier hs-var">String</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487773"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-399"></span><span>
</span><span id="line-400"></span><span>  </span><span id="local-6989586621679487775"><span class="annot"><span class="annottext">lexStrItem :: ReadP (Char, Bool)
</span><a href="#local-6989586621679487775"><span class="hs-identifier hs-var hs-var">lexStrItem</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ReadP ()
</span><a href="#local-6989586621679487771"><span class="hs-identifier hs-var">lexEmpty</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP () -&gt; ReadP (Char, Bool) -&gt; ReadP (Char, Bool)
forall (m :: * -&gt; *) a b. Monad m =&gt; m a -&gt; m b -&gt; m b
</span><a href="GHC.Base.html#%3E%3E"><span class="hs-operator hs-var">&gt;&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP (Char, Bool)
</span><a href="#local-6989586621679487775"><span class="hs-identifier hs-var">lexStrItem</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-401"></span><span>               </span><span class="annot"><span class="annottext">ReadP (Char, Bool) -&gt; ReadP (Char, Bool) -&gt; ReadP (Char, Bool)
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP (Char, Bool)
</span><a href="Text.Read.Lex.html#lexCharE"><span class="hs-identifier hs-var">lexCharE</span></a></span><span>
</span><span id="line-402"></span><span>
</span><span id="line-403"></span><span>  </span><span id="local-6989586621679487771"><span class="annot"><span class="annottext">lexEmpty :: ReadP ()
</span><a href="#local-6989586621679487771"><span class="hs-identifier hs-var hs-var">lexEmpty</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-404"></span><span>    </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\\'</span></span><span>
</span><span id="line-405"></span><span>       </span><span id="local-6989586621679487764"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487764"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#get"><span class="hs-identifier hs-var">get</span></a></span><span>
</span><span id="line-406"></span><span>       </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487764"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-407"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'&amp;'</span></span><span>           </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">() -&gt; ReadP ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-408"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="GHC.Unicode.html#isSpace"><span class="hs-identifier hs-var">isSpace</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487764"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">ReadP ()
</span><a href="Text.ParserCombinators.ReadP.html#skipSpaces"><span class="hs-identifier hs-var">skipSpaces</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'\\'</span></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">() -&gt; ReadP ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-409"></span><span>         </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">ReadP ()
forall a. ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#pfail"><span class="hs-identifier hs-var">pfail</span></a></span><span>
</span><span id="line-410"></span><span>
</span><span id="line-411"></span><span class="hs-comment">-- ---------------------------------------------------------------------------</span><span>
</span><span id="line-412"></span><span class="hs-comment">--  Lexing numbers</span><span>
</span><span id="line-413"></span><span>
</span><span id="line-414"></span><span class="hs-keyword">type</span><span> </span><span id="Base"><span class="annot"><a href="Text.Read.Lex.html#Base"><span class="hs-identifier hs-var">Base</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-415"></span><span class="hs-keyword">type</span><span> </span><span id="Digits"><span class="annot"><a href="Text.Read.Lex.html#Digits"><span class="hs-identifier hs-var">Digits</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-416"></span><span>
</span><span id="line-417"></span><span class="annot"><a href="Text.Read.Lex.html#lexNumber"><span class="hs-identifier hs-type">lexNumber</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-418"></span><span id="lexNumber"><span class="annot"><span class="annottext">lexNumber :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexNumber"><span class="hs-identifier hs-var hs-var">lexNumber</span></a></span></span><span>
</span><span id="line-419"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexHexOct"><span class="hs-identifier hs-var">lexHexOct</span></a></span><span>  </span><span class="annot"><span class="annottext">ReadP Lexeme -&gt; ReadP Lexeme -&gt; ReadP Lexeme
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%3C%2B%2B"><span class="hs-operator hs-var">&lt;++</span></a></span><span>      </span><span class="hs-comment">-- First try for hex or octal 0x, 0o etc</span><span>
</span><span id="line-420"></span><span>                        </span><span class="hs-comment">-- If that fails, try for a decimal number</span><span>
</span><span id="line-421"></span><span>    </span><span class="annot"><span class="annottext">ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexDecNumber"><span class="hs-identifier hs-var">lexDecNumber</span></a></span><span>        </span><span class="hs-comment">-- Start with ordinary digits</span><span>
</span><span id="line-422"></span><span>
</span><span id="line-423"></span><span class="annot"><a href="Text.Read.Lex.html#lexHexOct"><span class="hs-identifier hs-type">lexHexOct</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-424"></span><span id="lexHexOct"><span class="annot"><span class="annottext">lexHexOct :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexHexOct"><span class="hs-identifier hs-var hs-var">lexHexOct</span></a></span></span><span>
</span><span id="line-425"></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>  </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span>
</span><span id="line-426"></span><span>        </span><span id="local-6989586621679487760"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487760"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Int
</span><a href="Text.Read.Lex.html#lexBaseChar"><span class="hs-identifier hs-var">lexBaseChar</span></a></span><span>
</span><span id="line-427"></span><span>        </span><span id="local-6989586621679487759"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487759"><span class="hs-identifier hs-var">digits</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Digits
</span><a href="Text.Read.Lex.html#lexDigits"><span class="hs-identifier hs-var">lexDigits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487760"><span class="hs-identifier hs-var">base</span></a></span><span>
</span><span id="line-428"></span><span>        </span><span class="annot"><span class="annottext">Lexeme -&gt; ReadP Lexeme
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Number -&gt; Lexeme
</span><a href="Text.Read.Lex.html#Number"><span class="hs-identifier hs-var">Number</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Digits -&gt; Number
</span><a href="Text.Read.Lex.html#MkNumber"><span class="hs-identifier hs-var">MkNumber</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487760"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487759"><span class="hs-identifier hs-var">digits</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-429"></span><span>
</span><span id="line-430"></span><span class="annot"><a href="Text.Read.Lex.html#lexBaseChar"><span class="hs-identifier hs-type">lexBaseChar</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-431"></span><span class="hs-comment">-- Lex a single character indicating the base; fail if not there</span><span>
</span><span id="line-432"></span><span id="lexBaseChar"><span class="annot"><span class="annottext">lexBaseChar :: ReadP Int
</span><a href="Text.Read.Lex.html#lexBaseChar"><span class="hs-identifier hs-var hs-var">lexBaseChar</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="hs-special">{</span><span> </span><span id="local-6989586621679487757"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487757"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#get"><span class="hs-identifier hs-var">get</span></a></span><span class="hs-special">;</span><span>
</span><span id="line-433"></span><span>                   </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487757"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-434"></span><span>                        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'o'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Int
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span>
</span><span id="line-435"></span><span>                        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'O'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Int
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">8</span></span><span>
</span><span id="line-436"></span><span>                        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'x'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Int
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span>
</span><span id="line-437"></span><span>                        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'X'</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Int
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">16</span></span><span>
</span><span id="line-438"></span><span>                        </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span>   </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ReadP Int
forall a. ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#pfail"><span class="hs-identifier hs-var">pfail</span></a></span><span> </span><span class="hs-special">}</span><span>
</span><span id="line-439"></span><span>
</span><span id="line-440"></span><span class="annot"><a href="Text.Read.Lex.html#lexDecNumber"><span class="hs-identifier hs-type">lexDecNumber</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Lexeme"><span class="hs-identifier hs-type">Lexeme</span></a></span><span>
</span><span id="line-441"></span><span id="lexDecNumber"><span class="annot"><span class="annottext">lexDecNumber :: ReadP Lexeme
</span><a href="Text.Read.Lex.html#lexDecNumber"><span class="hs-identifier hs-var hs-var">lexDecNumber</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-442"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487756"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487756"><span class="hs-identifier hs-var">xs</span></a></span></span><span>    </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Digits
</span><a href="Text.Read.Lex.html#lexDigits"><span class="hs-identifier hs-var">lexDigits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-443"></span><span>     </span><span id="local-6989586621679487755"><span class="annot"><span class="annottext">Maybe Digits
</span><a href="#local-6989586621679487755"><span class="hs-identifier hs-var">mFrac</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP (Maybe Digits)
</span><a href="Text.Read.Lex.html#lexFrac"><span class="hs-identifier hs-var">lexFrac</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP (Maybe Digits)
-&gt; ReadP (Maybe Digits) -&gt; ReadP (Maybe Digits)
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%3C%2B%2B"><span class="hs-operator hs-var">&lt;++</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Digits -&gt; ReadP (Maybe Digits)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Digits
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-444"></span><span>     </span><span id="local-6989586621679487753"><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679487753"><span class="hs-identifier hs-var">mExp</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP (Maybe Integer)
</span><a href="Text.Read.Lex.html#lexExp"><span class="hs-identifier hs-var">lexExp</span></a></span><span>  </span><span class="annot"><span class="annottext">ReadP (Maybe Integer)
-&gt; ReadP (Maybe Integer) -&gt; ReadP (Maybe Integer)
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%3C%2B%2B"><span class="hs-operator hs-var">&lt;++</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer -&gt; ReadP (Maybe Integer)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-445"></span><span>     </span><span class="annot"><span class="annottext">Lexeme -&gt; ReadP Lexeme
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Number -&gt; Lexeme
</span><a href="Text.Read.Lex.html#Number"><span class="hs-identifier hs-var">Number</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits -&gt; Maybe Digits -&gt; Maybe Integer -&gt; Number
</span><a href="Text.Read.Lex.html#MkDecimal"><span class="hs-identifier hs-var">MkDecimal</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487756"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Digits
</span><a href="#local-6989586621679487755"><span class="hs-identifier hs-var">mFrac</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe Integer
</span><a href="#local-6989586621679487753"><span class="hs-identifier hs-var">mExp</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-446"></span><span>
</span><span id="line-447"></span><span class="annot"><a href="Text.Read.Lex.html#lexFrac"><span class="hs-identifier hs-type">lexFrac</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Digits"><span class="hs-identifier hs-type">Digits</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-448"></span><span class="hs-comment">-- Read the fractional part; fail if it doesn't</span><span>
</span><span id="line-449"></span><span class="hs-comment">-- start &quot;.d&quot; where d is a digit</span><span>
</span><span id="line-450"></span><span id="lexFrac"><span class="annot"><span class="annottext">lexFrac :: ReadP (Maybe Digits)
</span><a href="Text.Read.Lex.html#lexFrac"><span class="hs-identifier hs-var hs-var">lexFrac</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'.'</span></span><span>
</span><span id="line-451"></span><span>             </span><span id="local-6989586621679487751"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487751"><span class="hs-identifier hs-var">fraction</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Digits
</span><a href="Text.Read.Lex.html#lexDigits"><span class="hs-identifier hs-var">lexDigits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-452"></span><span>             </span><span class="annot"><span class="annottext">Maybe Digits -&gt; ReadP (Maybe Digits)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits -&gt; Maybe Digits
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487751"><span class="hs-identifier hs-var">fraction</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-453"></span><span>
</span><span id="line-454"></span><span class="annot"><a href="Text.Read.Lex.html#lexExp"><span class="hs-identifier hs-type">lexExp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-455"></span><span id="lexExp"><span class="annot"><span class="annottext">lexExp :: ReadP (Maybe Integer)
</span><a href="Text.Read.Lex.html#lexExp"><span class="hs-identifier hs-var hs-var">lexExp</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'e'</span></span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP Char -&gt; ReadP Char
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'E'</span></span><span>
</span><span id="line-456"></span><span>            </span><span id="local-6989586621679487750"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487750"><span class="hs-identifier hs-var">exp</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Integer
</span><a href="#local-6989586621679487749"><span class="hs-identifier hs-var">signedExp</span></a></span><span> </span><span class="annot"><span class="annottext">ReadP Integer -&gt; ReadP Integer -&gt; ReadP Integer
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Integer
</span><a href="Text.Read.Lex.html#lexInteger"><span class="hs-identifier hs-var">lexInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-457"></span><span>            </span><span class="annot"><span class="annottext">Maybe Integer -&gt; ReadP (Maybe Integer)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Maybe Integer
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487750"><span class="hs-identifier hs-var">exp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-458"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-459"></span><span>   </span><span id="local-6989586621679487749"><span class="annot"><span class="annottext">signedExp :: ReadP Integer
</span><a href="#local-6989586621679487749"><span class="hs-identifier hs-var hs-var">signedExp</span></a></span></span><span>
</span><span id="line-460"></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487743"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487743"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="annot"><span class="annottext">ReadP Char -&gt; ReadP Char -&gt; ReadP Char
forall a. ReadP a -&gt; ReadP a -&gt; ReadP a
</span><a href="Text.ParserCombinators.ReadP.html#%2B%2B%2B"><span class="hs-operator hs-var">+++</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#char"><span class="hs-identifier hs-var">char</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'+'</span></span><span>
</span><span id="line-461"></span><span>          </span><span id="local-6989586621679487742"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487742"><span class="hs-identifier hs-var">n</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Integer
</span><a href="Text.Read.Lex.html#lexInteger"><span class="hs-identifier hs-var">lexInteger</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span>
</span><span id="line-462"></span><span>          </span><span class="annot"><span class="annottext">Integer -&gt; ReadP Integer
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487743"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3D%3D"><span class="hs-operator hs-var">==</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'-'</span></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487742"><span class="hs-identifier hs-var">n</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487742"><span class="hs-identifier hs-var">n</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-463"></span><span>
</span><span id="line-464"></span><span class="annot"><a href="Text.Read.Lex.html#lexDigits"><span class="hs-identifier hs-type">lexDigits</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Digits"><span class="hs-identifier hs-type">Digits</span></a></span><span>
</span><span id="line-465"></span><span class="hs-comment">-- Lex a non-empty sequence of digits in specified base</span><span>
</span><span id="line-466"></span><span id="lexDigits"><span class="annot"><span class="annottext">lexDigits :: Int -&gt; ReadP Digits
</span><a href="Text.Read.Lex.html#lexDigits"><span class="hs-identifier hs-var hs-var">lexDigits</span></a></span></span><span> </span><span id="local-6989586621679487741"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487741"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-467"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487740"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487740"><span class="hs-identifier hs-var">s</span></a></span></span><span>  </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#look"><span class="hs-identifier hs-var">look</span></a></span><span>
</span><span id="line-468"></span><span>     </span><span id="local-6989586621679487739"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487739"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">String -&gt; (Digits -&gt; Digits) -&gt; ReadP Digits
forall {a}. String -&gt; (Digits -&gt; a) -&gt; ReadP a
</span><a href="#local-6989586621679487738"><span class="hs-identifier hs-var">scan</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487740"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="annot"><span class="annottext">Digits -&gt; Digits
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>
</span><span id="line-469"></span><span>     </span><span class="annot"><span class="annottext">Bool -&gt; ReadP ()
forall (m :: * -&gt; *). MonadPlus m =&gt; Bool -&gt; m ()
</span><a href="Text.Read.Lex.html#guard"><span class="hs-identifier hs-var">guard</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#not"><span class="hs-identifier hs-var">not</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits -&gt; Bool
forall a. [a] -&gt; Bool
</span><a href="GHC.List.html#null"><span class="hs-identifier hs-var">null</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487739"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-470"></span><span>     </span><span class="annot"><span class="annottext">Digits -&gt; ReadP Digits
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487739"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-471"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-472"></span><span>  </span><span id="local-6989586621679487738"><span class="annot"><span class="annottext">scan :: String -&gt; (Digits -&gt; a) -&gt; ReadP a
</span><a href="#local-6989586621679487738"><span class="hs-identifier hs-var hs-var">scan</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679487732"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487732"><span class="hs-identifier hs-var">c</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679487731"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487731"><span class="hs-identifier hs-var">cs</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679487730"><span class="annot"><span class="annottext">Digits -&gt; a
</span><a href="#local-6989586621679487730"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Char -&gt; Maybe Int
forall a. (Eq a, Num a) =&gt; a -&gt; Char -&gt; Maybe Int
</span><a href="Text.Read.Lex.html#valDig"><span class="hs-identifier hs-var">valDig</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487741"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487732"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-473"></span><span>                    </span><span class="annot"><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679487728"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487728"><span class="hs-identifier hs-var">n</span></a></span></span><span>  </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ReadP Char
</span><a href="Text.ParserCombinators.ReadP.html#get"><span class="hs-identifier hs-var">get</span></a></span><span class="hs-special">;</span><span> </span><span class="annot"><span class="annottext">String -&gt; (Digits -&gt; a) -&gt; ReadP a
</span><a href="#local-6989586621679487738"><span class="hs-identifier hs-var">scan</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487731"><span class="hs-identifier hs-var">cs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits -&gt; a
</span><a href="#local-6989586621679487730"><span class="hs-identifier hs-var">f</span></a></span><span class="annot"><span class="annottext">(Digits -&gt; a) -&gt; (Digits -&gt; Digits) -&gt; Digits -&gt; a
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487728"><span class="hs-identifier hs-var">n</span></a></span><span class="annot"><span class="annottext">Int -&gt; Digits -&gt; Digits
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-474"></span><span>                    </span><span class="annot"><span class="annottext">Maybe Int
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">a -&gt; ReadP a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits -&gt; a
</span><a href="#local-6989586621679487730"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-475"></span><span>  </span><span class="annot"><a href="#local-6989586621679487738"><span class="hs-identifier hs-var">scan</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>     </span><span id="local-6989586621679487727"><span class="annot"><span class="annottext">Digits -&gt; a
</span><a href="#local-6989586621679487727"><span class="hs-identifier hs-var">f</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span> </span><span class="annot"><span class="annottext">a -&gt; ReadP a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits -&gt; a
</span><a href="#local-6989586621679487727"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-476"></span><span>
</span><span id="line-477"></span><span class="annot"><a href="Text.Read.Lex.html#lexInteger"><span class="hs-identifier hs-type">lexInteger</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Base"><span class="hs-identifier hs-type">Base</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-478"></span><span id="lexInteger"><span class="annot"><span class="annottext">lexInteger :: Int -&gt; ReadP Integer
</span><a href="Text.Read.Lex.html#lexInteger"><span class="hs-identifier hs-var hs-var">lexInteger</span></a></span></span><span> </span><span id="local-6989586621679487726"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487726"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-479"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487725"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487725"><span class="hs-identifier hs-var">xs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Int -&gt; ReadP Digits
</span><a href="Text.Read.Lex.html#lexDigits"><span class="hs-identifier hs-var">lexDigits</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487726"><span class="hs-identifier hs-var">base</span></a></span><span>
</span><span id="line-480"></span><span>     </span><span class="annot"><span class="annottext">Integer -&gt; ReadP Integer
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer -&gt; Digits -&gt; Integer
forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487726"><span class="hs-identifier hs-var">base</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487725"><span class="hs-identifier hs-var">xs</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-481"></span><span>
</span><span id="line-482"></span><span id="local-6989586621679488391"><span class="annot"><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-type">val</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488391"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679488391"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Digits"><span class="hs-identifier hs-type">Digits</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679488391"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-483"></span><span id="val"><span class="annot"><span class="annottext">val :: forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var hs-var">val</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Digits -&gt; a
forall a d. (Num a, Integral d) =&gt; a -&gt; [d] -&gt; a
</span><a href="Text.Read.Lex.html#valSimple"><span class="hs-identifier hs-var">valSimple</span></a></span><span>
</span><span id="line-484"></span><span class="hs-pragma">{-# RULES</span><span>
</span><span id="line-485"></span><span class="annot"><span class="hs-pragma">&quot;val/Integer&quot;</span></span><span> </span><span class="annot"><a href="Text.Read.Lex.html#val"><span class="hs-pragma hs-type">val</span></a></span><span> </span><span class="hs-pragma">=</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#valInteger"><span class="hs-pragma hs-type">valInteger</span></a></span><span>
</span><span id="line-486"></span><span>  </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-487"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="hs-pragma">[</span><span class="hs-pragma">1</span><span class="hs-pragma">]</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#val"><span class="hs-pragma hs-type">val</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-488"></span><span>
</span><span id="line-489"></span><span class="hs-comment">-- The following algorithm is only linear for types whose Num operations</span><span>
</span><span id="line-490"></span><span class="hs-comment">-- are in constant time.</span><span>
</span><span id="line-491"></span><span id="local-6989586621679488357"><span id="local-6989586621679488358"><span class="annot"><a href="Text.Read.Lex.html#valSimple"><span class="hs-identifier hs-type">valSimple</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488358"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Real.html#Integral"><span class="hs-identifier hs-type">Integral</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488357"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679488358"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679488357"><span class="hs-identifier hs-type">d</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679488358"><span class="hs-identifier hs-type">a</span></a></span></span></span><span>
</span><span id="line-492"></span><span id="valSimple"><span class="annot"><span class="annottext">valSimple :: forall a d. (Num a, Integral d) =&gt; a -&gt; [d] -&gt; a
</span><a href="Text.Read.Lex.html#valSimple"><span class="hs-identifier hs-var hs-var">valSimple</span></a></span></span><span> </span><span id="local-6989586621679487715"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487715"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; [d] -&gt; a
forall {a}. Integral a =&gt; a -&gt; [a] -&gt; a
</span><a href="#local-6989586621679487714"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">0</span></span><span>
</span><span id="line-493"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-494"></span><span>    </span><span id="local-6989586621679487714"><span class="annot"><span class="annottext">go :: a -&gt; [a] -&gt; a
</span><a href="#local-6989586621679487714"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679487712"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487712"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487712"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-495"></span><span>    </span><span class="annot"><a href="#local-6989586621679487714"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679487711"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487711"><span class="hs-identifier hs-var">r</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679487710"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487710"><span class="hs-identifier hs-var">d</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679487709"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487709"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487708"><span class="hs-identifier hs-var">r'</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; a
</span><a href="#local-6989586621679487714"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487708"><span class="hs-identifier hs-var">r'</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487709"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-496"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-497"></span><span>        </span><span id="local-6989586621679487708"><span class="annot"><span class="annottext">r' :: a
</span><a href="#local-6989586621679487708"><span class="hs-identifier hs-var hs-var">r'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487711"><span class="hs-identifier hs-var">r</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487715"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487710"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-498"></span><span class="hs-pragma">{-# INLINE</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#valSimple"><span class="hs-pragma hs-type">valSimple</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-499"></span><span>
</span><span id="line-500"></span><span class="hs-comment">-- A sub-quadratic algorithm for Integer. Pairs of adjacent radix b</span><span>
</span><span id="line-501"></span><span class="hs-comment">-- digits are combined into a single radix b^2 digit. This process is</span><span>
</span><span id="line-502"></span><span class="hs-comment">-- repeated until we are left with a single digit. This algorithm</span><span>
</span><span id="line-503"></span><span class="hs-comment">-- performs well only on large inputs, so we use the simple algorithm</span><span>
</span><span id="line-504"></span><span class="hs-comment">-- for smaller inputs.</span><span>
</span><span id="line-505"></span><span class="annot"><a href="Text.Read.Lex.html#valInteger"><span class="hs-identifier hs-type">valInteger</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Digits"><span class="hs-identifier hs-type">Digits</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span>
</span><span id="line-506"></span><span id="valInteger"><span class="annot"><span class="annottext">valInteger :: Integer -&gt; Digits -&gt; Integer
</span><a href="Text.Read.Lex.html#valInteger"><span class="hs-identifier hs-var hs-var">valInteger</span></a></span></span><span> </span><span id="local-6989586621679487703"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487703"><span class="hs-identifier hs-var">b0</span></a></span></span><span> </span><span id="local-6989586621679487702"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487702"><span class="hs-identifier hs-var">ds0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Int -&gt; [Integer] -&gt; Integer
forall {t} {t}. (Integral t, Integral t) =&gt; t -&gt; t -&gt; [t] -&gt; t
</span><a href="#local-6989586621679487701"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487703"><span class="hs-identifier hs-var">b0</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Digits -&gt; Int
forall a. [a] -&gt; Int
</span><a href="GHC.List.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487702"><span class="hs-identifier hs-var">ds0</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">([Integer] -&gt; Integer) -&gt; [Integer] -&gt; Integer
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">(Int -&gt; Integer) -&gt; Digits -&gt; [Integer]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487702"><span class="hs-identifier hs-var">ds0</span></a></span><span>
</span><span id="line-507"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-508"></span><span>    </span><span id="local-6989586621679487701"><span class="annot"><span class="annottext">go :: t -&gt; t -&gt; [t] -&gt; t
</span><a href="#local-6989586621679487701"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">0</span></span><span>
</span><span id="line-509"></span><span>    </span><span class="annot"><a href="#local-6989586621679487701"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679487684"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487684"><span class="hs-identifier hs-var">d</span></a></span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487684"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-510"></span><span>    </span><span class="annot"><a href="#local-6989586621679487701"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span id="local-6989586621679487683"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487683"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span id="local-6989586621679487682"><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487682"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span id="local-6989586621679487681"><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679487681"><span class="hs-identifier hs-var">ds</span></a></span></span><span>
</span><span id="line-511"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487682"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3E"><span class="hs-operator hs-var">&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">40</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487680"><span class="hs-identifier hs-var">b'</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; [t] -&gt; t
</span><a href="#local-6989586621679487701"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487680"><span class="hs-identifier hs-var">b'</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487679"><span class="hs-identifier hs-var">l'</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t -&gt; [t] -&gt; [t]
forall {a}. Num a =&gt; a -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679487678"><span class="hs-identifier hs-var">combine</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487683"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679487677"><span class="hs-identifier hs-var">ds'</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-512"></span><span>        </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t -&gt; [t] -&gt; t
forall a d. (Num a, Integral d) =&gt; a -&gt; [d] -&gt; a
</span><a href="Text.Read.Lex.html#valSimple"><span class="hs-identifier hs-var">valSimple</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487683"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679487681"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-513"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-514"></span><span>        </span><span class="hs-comment">-- ensure that we have an even number of digits</span><span>
</span><span id="line-515"></span><span>        </span><span class="hs-comment">-- before we call combine:</span><span>
</span><span id="line-516"></span><span>        </span><span id="local-6989586621679487677"><span class="annot"><span class="annottext">ds' :: [t]
</span><a href="#local-6989586621679487677"><span class="hs-identifier hs-var hs-var">ds'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">t -&gt; Bool
forall a. Integral a =&gt; a -&gt; Bool
</span><a href="GHC.Real.html#even"><span class="hs-identifier hs-var">even</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487682"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679487681"><span class="hs-identifier hs-var">ds</span></a></span><span> </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">0</span></span><span> </span><span class="annot"><span class="annottext">t -&gt; [t] -&gt; [t]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">[t]
</span><a href="#local-6989586621679487681"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-517"></span><span>        </span><span id="local-6989586621679487680"><span class="annot"><span class="annottext">b' :: t
</span><a href="#local-6989586621679487680"><span class="hs-identifier hs-var hs-var">b'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487683"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487683"><span class="hs-identifier hs-var">b</span></a></span><span>
</span><span id="line-518"></span><span>        </span><span id="local-6989586621679487679"><span class="annot"><span class="annottext">l' :: t
</span><a href="#local-6989586621679487679"><span class="hs-identifier hs-var hs-var">l'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">t
</span><a href="#local-6989586621679487682"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">1</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">t -&gt; t -&gt; t
forall a. Integral a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Real.html#quot"><span class="hs-operator hs-var">`quot`</span></a></span><span> </span><span class="annot"><span class="annottext">t
</span><span class="hs-number">2</span></span><span>
</span><span id="line-519"></span><span>    </span><span id="local-6989586621679487678"><span class="annot"><span class="annottext">combine :: a -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679487678"><span class="hs-identifier hs-var hs-var">combine</span></a></span></span><span> </span><span id="local-6989586621679487668"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487668"><span class="hs-identifier hs-var">b</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679487667"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487667"><span class="hs-identifier hs-var">d1</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679487666"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487666"><span class="hs-identifier hs-var">d2</span></a></span></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span> </span><span id="local-6989586621679487665"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487665"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487664"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487664"><span class="hs-identifier hs-var">d</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-var">:</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; [a] -&gt; [a]
</span><a href="#local-6989586621679487678"><span class="hs-identifier hs-var">combine</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487668"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679487665"><span class="hs-identifier hs-var">ds</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-520"></span><span>      </span><span class="hs-keyword">where</span><span>
</span><span id="line-521"></span><span>        </span><span id="local-6989586621679487664"><span class="annot"><span class="annottext">d :: a
</span><a href="#local-6989586621679487664"><span class="hs-identifier hs-var hs-var">d</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487667"><span class="hs-identifier hs-var">d1</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487668"><span class="hs-identifier hs-var">b</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; a -&gt; a
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487666"><span class="hs-identifier hs-var">d2</span></a></span><span>
</span><span id="line-522"></span><span>    </span><span class="annot"><a href="#local-6989586621679487678"><span class="hs-identifier hs-var">combine</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-523"></span><span>    </span><span class="annot"><a href="#local-6989586621679487678"><span class="hs-identifier hs-var">combine</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; [a]
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;this should not happen&quot;</span></span><span>
</span><span id="line-524"></span><span>
</span><span id="line-525"></span><span class="hs-comment">-- Calculate a Rational from the exponent [of 10 to multiply with],</span><span>
</span><span id="line-526"></span><span class="hs-comment">-- the integral part of the mantissa and the digits of the fractional</span><span>
</span><span id="line-527"></span><span class="hs-comment">-- part. Leaving the calculation of the power of 10 until the end,</span><span>
</span><span id="line-528"></span><span class="hs-comment">-- when we know the effective exponent, saves multiplications.</span><span>
</span><span id="line-529"></span><span class="hs-comment">-- More importantly, this way we need at most one gcd instead of three.</span><span>
</span><span id="line-530"></span><span class="hs-comment">--</span><span>
</span><span id="line-531"></span><span class="hs-comment">-- frac was never used with anything but Integer and base 10, so</span><span>
</span><span id="line-532"></span><span class="hs-comment">-- those are hardcoded now (trivial to change if necessary).</span><span>
</span><span id="line-533"></span><span class="annot"><a href="Text.Read.Lex.html#fracExp"><span class="hs-identifier hs-type">fracExp</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-identifier hs-type">Integer</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#Digits"><span class="hs-identifier hs-type">Digits</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Real.html#Rational"><span class="hs-identifier hs-type">Rational</span></a></span><span>
</span><span id="line-534"></span><span id="fracExp"><span class="annot"><span class="annottext">fracExp :: Integer -&gt; Integer -&gt; Digits -&gt; Rational
</span><a href="Text.Read.Lex.html#fracExp"><span class="hs-identifier hs-var hs-var">fracExp</span></a></span></span><span> </span><span id="local-6989586621679487660"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487660"><span class="hs-identifier hs-var">exp</span></a></span></span><span> </span><span id="local-6989586621679487659"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487659"><span class="hs-identifier hs-var">mant</span></a></span></span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span>
</span><span id="line-535"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487660"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C"><span class="hs-operator hs-var">&lt;</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">0</span></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487659"><span class="hs-identifier hs-var">mant</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Rational
forall a. Integral a =&gt; a -&gt; a -&gt; Ratio a
</span><a href="GHC.Real.html#%25"><span class="hs-operator hs-var">%</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">-</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487660"><span class="hs-identifier hs-var">exp</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-536"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Rational
forall a. Num a =&gt; Integer -&gt; a
</span><a href="GHC.Num.html#fromInteger"><span class="hs-identifier hs-var">fromInteger</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487659"><span class="hs-identifier hs-var">mant</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a b. (Num a, Integral b) =&gt; a -&gt; b -&gt; a
</span><a href="GHC.Real.html#%5E"><span class="hs-operator hs-var">^</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487660"><span class="hs-identifier hs-var">exp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-537"></span><span class="annot"><a href="Text.Read.Lex.html#fracExp"><span class="hs-identifier hs-var">fracExp</span></a></span><span> </span><span id="local-6989586621679487658"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487658"><span class="hs-identifier hs-var">exp</span></a></span></span><span> </span><span id="local-6989586621679487657"><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487657"><span class="hs-identifier hs-var">mant</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679487656"><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487656"><span class="hs-identifier hs-var">d</span></a></span></span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#%3A"><span class="hs-glyph hs-type">:</span></a></span><span id="local-6989586621679487655"><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487655"><span class="hs-identifier hs-var">ds</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487654"><span class="hs-identifier hs-var">exp'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Rational -&gt; Rational
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487653"><span class="hs-identifier hs-var">mant'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Rational -&gt; Rational
</span><a href="../../ghc-prim/src/GHC.Prim.html#seq"><span class="hs-operator hs-var">`seq`</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Digits -&gt; Rational
</span><a href="Text.Read.Lex.html#fracExp"><span class="hs-identifier hs-var">fracExp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487654"><span class="hs-identifier hs-var">exp'</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487653"><span class="hs-identifier hs-var">mant'</span></a></span><span> </span><span class="annot"><span class="annottext">Digits
</span><a href="#local-6989586621679487655"><span class="hs-identifier hs-var">ds</span></a></span><span>
</span><span id="line-538"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-539"></span><span>    </span><span id="local-6989586621679487654"><span class="annot"><span class="annottext">exp' :: Integer
</span><a href="#local-6989586621679487654"><span class="hs-identifier hs-var hs-var">exp'</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487658"><span class="hs-identifier hs-var">exp</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">1</span></span><span>
</span><span id="line-540"></span><span>    </span><span id="local-6989586621679487653"><span class="annot"><span class="annottext">mant' :: Integer
</span><a href="#local-6989586621679487653"><span class="hs-identifier hs-var hs-var">mant'</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Integer
</span><a href="#local-6989586621679487657"><span class="hs-identifier hs-var">mant</span></a></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2A"><span class="hs-operator hs-var">*</span></a></span><span> </span><span class="annot"><span class="annottext">Integer
</span><span class="hs-number">10</span></span><span> </span><span class="annot"><span class="annottext">Integer -&gt; Integer -&gt; Integer
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Integer
forall a b. (Integral a, Num b) =&gt; a -&gt; b
</span><a href="GHC.Real.html#fromIntegral"><span class="hs-identifier hs-var">fromIntegral</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><a href="#local-6989586621679487656"><span class="hs-identifier hs-var">d</span></a></span><span>
</span><span id="line-541"></span><span>
</span><span id="line-542"></span><span id="local-6989586621679488360"><span class="annot"><a href="Text.Read.Lex.html#valDig"><span class="hs-identifier hs-type">valDig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488360"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488360"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679488360"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span></span><span>
</span><span id="line-543"></span><span id="valDig"><span class="annot"><span class="annottext">valDig :: forall a. (Eq a, Num a) =&gt; a -&gt; Char -&gt; Maybe Int
</span><a href="Text.Read.Lex.html#valDig"><span class="hs-identifier hs-var hs-var">valDig</span></a></span></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">8</span></span><span> </span><span id="local-6989586621679487621"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487621"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-544"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487621"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487621"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'7'</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487621"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span class="hs-special">)</span><span>
</span><span id="line-545"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-546"></span><span>
</span><span id="line-547"></span><span class="annot"><a href="Text.Read.Lex.html#valDig"><span class="hs-identifier hs-var">valDig</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">10</span></span><span> </span><span id="local-6989586621679487620"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487620"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Char -&gt; Maybe Int
</span><a href="Text.Read.Lex.html#valDecDig"><span class="hs-identifier hs-var">valDecDig</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487620"><span class="hs-identifier hs-var">c</span></a></span><span>
</span><span id="line-548"></span><span>
</span><span id="line-549"></span><span class="annot"><a href="Text.Read.Lex.html#valDig"><span class="hs-identifier hs-var">valDig</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">16</span></span><span> </span><span id="local-6989586621679487618"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487618"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-550"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487618"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487618"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'9'</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487618"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span class="hs-special">)</span><span>
</span><span id="line-551"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'a'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487618"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487618"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'f'</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487618"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'a'</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span class="hs-special">)</span><span>
</span><span id="line-552"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'A'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487618"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487618"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'F'</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487618"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'A'</span></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#%2B"><span class="hs-operator hs-var">+</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">10</span></span><span class="hs-special">)</span><span>
</span><span id="line-553"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-554"></span><span>
</span><span id="line-555"></span><span class="annot"><a href="Text.Read.Lex.html#valDig"><span class="hs-identifier hs-var">valDig</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe Int
forall a. String -&gt; a
</span><a href="GHC.Err.html#errorWithoutStackTrace"><span class="hs-identifier hs-var">errorWithoutStackTrace</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;valDig: Bad base&quot;</span></span><span>
</span><span id="line-556"></span><span>
</span><span id="line-557"></span><span class="annot"><a href="Text.Read.Lex.html#valDecDig"><span class="hs-identifier hs-type">valDecDig</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span>
</span><span id="line-558"></span><span id="valDecDig"><span class="annot"><span class="annottext">valDecDig :: Char -&gt; Maybe Int
</span><a href="Text.Read.Lex.html#valDecDig"><span class="hs-identifier hs-var hs-var">valDecDig</span></a></span></span><span> </span><span id="local-6989586621679487617"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487617"><span class="hs-identifier hs-var">c</span></a></span></span><span>
</span><span id="line-559"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487617"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%26%26"><span class="hs-operator hs-var">&amp;&amp;</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487617"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Char -&gt; Bool
forall a. Ord a =&gt; a -&gt; a -&gt; Bool
</span><a href="../../ghc-prim/src/GHC.Classes.html#%3C%3D"><span class="hs-operator hs-var">&lt;=</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'9'</span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; Maybe Int
forall a. a -&gt; Maybe a
</span><a href="GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487617"><span class="hs-identifier hs-var">c</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Int
forall a. Num a =&gt; a -&gt; a -&gt; a
</span><a href="GHC.Num.html#-"><span class="hs-glyph hs-var">-</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="GHC.Base.html#ord"><span class="hs-identifier hs-var">ord</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><span class="hs-char">'0'</span></span><span class="hs-special">)</span><span>
</span><span id="line-560"></span><span>  </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Maybe Int
forall a. Maybe a
</span><a href="GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-561"></span><span>
</span><span id="line-562"></span><span class="hs-comment">-- ----------------------------------------------------------------------</span><span>
</span><span id="line-563"></span><span class="hs-comment">-- other numeric lexing functions</span><span>
</span><span id="line-564"></span><span>
</span><span id="line-565"></span><span id="local-6989586621679488338"><span class="annot"><a href="Text.Read.Lex.html#readIntP"><span class="hs-identifier hs-type">readIntP</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488338"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679488338"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-identifier hs-type">Bool</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-identifier hs-type">Char</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-identifier hs-type">Int</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488338"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-566"></span><span id="readIntP"><span class="annot"><span class="annottext">readIntP :: forall a. Num a =&gt; a -&gt; (Char -&gt; Bool) -&gt; (Char -&gt; Int) -&gt; ReadP a
</span><a href="Text.Read.Lex.html#readIntP"><span class="hs-identifier hs-var hs-var">readIntP</span></a></span></span><span> </span><span id="local-6989586621679487612"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487612"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span id="local-6989586621679487611"><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679487611"><span class="hs-identifier hs-var">isDigit</span></a></span></span><span> </span><span id="local-6989586621679487610"><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="#local-6989586621679487610"><span class="hs-identifier hs-var">valDigit</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-567"></span><span>  </span><span class="hs-keyword">do</span><span> </span><span id="local-6989586621679487609"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487609"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; ReadP String
</span><a href="Text.ParserCombinators.ReadP.html#munch1"><span class="hs-identifier hs-var">munch1</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679487611"><span class="hs-identifier hs-var">isDigit</span></a></span><span>
</span><span id="line-568"></span><span>     </span><span class="annot"><span class="annottext">a -&gt; ReadP a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Digits -&gt; a
forall a. Num a =&gt; a -&gt; Digits -&gt; a
</span><a href="Text.Read.Lex.html#val"><span class="hs-identifier hs-var">val</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487612"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; Int) -&gt; String -&gt; Digits
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="#local-6989586621679487610"><span class="hs-identifier hs-var">valDigit</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679487609"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-569"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readIntP"><span class="hs-pragma hs-type">readIntP</span></a></span><span>
</span><span id="line-570"></span><span>        </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-pragma hs-type">Char</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Bool"><span class="hs-pragma hs-type">Bool</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="hs-pragma">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Char"><span class="hs-pragma hs-type">Char</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="../../ghc-prim/src/GHC.Types.html#Int"><span class="hs-pragma hs-type">Int</span></a></span><span class="hs-pragma">)</span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-pragma hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-571"></span><span>
</span><span id="line-572"></span><span id="local-6989586621679488336"><span class="annot"><a href="Text.Read.Lex.html#readIntP%27"><span class="hs-identifier hs-type">readIntP'</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488336"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488336"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679488336"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488336"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-573"></span><span id="readIntP%27"><span class="annot"><span class="annottext">readIntP' :: forall a. (Eq a, Num a) =&gt; a -&gt; ReadP a
</span><a href="Text.Read.Lex.html#readIntP%27"><span class="hs-identifier hs-var hs-var">readIntP'</span></a></span></span><span> </span><span id="local-6989586621679487604"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487604"><span class="hs-identifier hs-var">base</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; (Char -&gt; Bool) -&gt; (Char -&gt; Int) -&gt; ReadP a
forall a. Num a =&gt; a -&gt; (Char -&gt; Bool) -&gt; (Char -&gt; Int) -&gt; ReadP a
</span><a href="Text.Read.Lex.html#readIntP"><span class="hs-identifier hs-var">readIntP</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487604"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="#local-6989586621679487603"><span class="hs-identifier hs-var">isDigit</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Int
</span><a href="#local-6989586621679487602"><span class="hs-identifier hs-var">valDigit</span></a></span><span>
</span><span id="line-574"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-575"></span><span>  </span><span id="local-6989586621679487603"><span class="annot"><span class="annottext">isDigit :: Char -&gt; Bool
</span><a href="#local-6989586621679487603"><span class="hs-identifier hs-var hs-var">isDigit</span></a></span></span><span>  </span><span id="local-6989586621679487599"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487599"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; (Int -&gt; Bool) -&gt; Maybe Int -&gt; Bool
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#False"><span class="hs-identifier hs-var">False</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Int -&gt; Bool
forall a b. a -&gt; b -&gt; a
</span><a href="GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../ghc-prim/src/GHC.Types.html#True"><span class="hs-identifier hs-var">True</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Char -&gt; Maybe Int
forall a. (Eq a, Num a) =&gt; a -&gt; Char -&gt; Maybe Int
</span><a href="Text.Read.Lex.html#valDig"><span class="hs-identifier hs-var">valDig</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487604"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487599"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-576"></span><span>  </span><span id="local-6989586621679487602"><span class="annot"><span class="annottext">valDigit :: Char -&gt; Int
</span><a href="#local-6989586621679487602"><span class="hs-identifier hs-var hs-var">valDigit</span></a></span></span><span> </span><span id="local-6989586621679487593"><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487593"><span class="hs-identifier hs-var">c</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Int -&gt; (Int -&gt; Int) -&gt; Maybe Int -&gt; Int
forall b a. b -&gt; (a -&gt; b) -&gt; Maybe a -&gt; b
</span><a href="Data.Maybe.html#maybe"><span class="hs-identifier hs-var">maybe</span></a></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">0</span></span><span>     </span><span class="annot"><span class="annottext">Int -&gt; Int
forall a. a -&gt; a
</span><a href="GHC.Base.html#id"><span class="hs-identifier hs-var">id</span></a></span><span>           </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Char -&gt; Maybe Int
forall a. (Eq a, Num a) =&gt; a -&gt; Char -&gt; Maybe Int
</span><a href="Text.Read.Lex.html#valDig"><span class="hs-identifier hs-var">valDig</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679487604"><span class="hs-identifier hs-var">base</span></a></span><span> </span><span class="annot"><span class="annottext">Char
</span><a href="#local-6989586621679487593"><span class="hs-identifier hs-var">c</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-577"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readIntP%27"><span class="hs-pragma hs-type">readIntP'</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">-&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-pragma hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-578"></span><span>
</span><span id="line-579"></span><span id="local-6989586621679488330"><span class="annot"><a href="Text.Read.Lex.html#readOctP"><span class="hs-identifier hs-type">readOctP</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readDecP"><span class="hs-identifier hs-type">readDecP</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readHexP"><span class="hs-identifier hs-type">readHexP</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../ghc-prim/src/GHC.Classes.html#Eq"><span class="hs-identifier hs-type">Eq</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488330"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="GHC.Num.html#Num"><span class="hs-identifier hs-type">Num</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488330"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-identifier hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679488330"><span class="hs-identifier hs-type">a</span></a></span></span><span>
</span><span id="line-580"></span><span id="readOctP"><span class="annot"><span class="annottext">readOctP :: forall a. (Eq a, Num a) =&gt; ReadP a
</span><a href="Text.Read.Lex.html#readOctP"><span class="hs-identifier hs-var hs-var">readOctP</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ReadP a
forall a. (Eq a, Num a) =&gt; a -&gt; ReadP a
</span><a href="Text.Read.Lex.html#readIntP%27"><span class="hs-identifier hs-var">readIntP'</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">8</span></span><span>
</span><span id="line-581"></span><span id="readDecP"><span class="annot"><span class="annottext">readDecP :: forall a. (Eq a, Num a) =&gt; ReadP a
</span><a href="Text.Read.Lex.html#readDecP"><span class="hs-identifier hs-var hs-var">readDecP</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ReadP a
forall a. (Eq a, Num a) =&gt; a -&gt; ReadP a
</span><a href="Text.Read.Lex.html#readIntP%27"><span class="hs-identifier hs-var">readIntP'</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">10</span></span><span>
</span><span id="line-582"></span><span id="readHexP"><span class="annot"><span class="annottext">readHexP :: forall a. (Eq a, Num a) =&gt; ReadP a
</span><a href="Text.Read.Lex.html#readHexP"><span class="hs-identifier hs-var hs-var">readHexP</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; ReadP a
forall a. (Eq a, Num a) =&gt; a -&gt; ReadP a
</span><a href="Text.Read.Lex.html#readIntP%27"><span class="hs-identifier hs-var">readIntP'</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-number">16</span></span><span>
</span><span id="line-583"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readOctP"><span class="hs-pragma hs-type">readOctP</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-pragma hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-584"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readDecP"><span class="hs-pragma hs-type">readDecP</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-pragma hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-585"></span><span class="hs-pragma">{-# SPECIALISE</span><span> </span><span class="annot"><a href="Text.Read.Lex.html#readHexP"><span class="hs-pragma hs-type">readHexP</span></a></span><span> </span><span class="hs-pragma">::</span><span> </span><span class="annot"><a href="Text.ParserCombinators.ReadP.html#ReadP"><span class="hs-pragma hs-type">ReadP</span></a></span><span> </span><span class="annot"><a href="../../ghc-bignum/src/GHC.Num.Integer.html#Integer"><span class="hs-pragma hs-type">Integer</span></a></span><span> </span><span class="hs-pragma">#-}</span><span>
</span><span id="line-586"></span></pre></body></html>